David,
Tried your suggestion, works great. Thanks a lot.
I also tried using convert function to get counts for
multiple dates and works fine.
But I was trying to sort the rows using date, that
doesn't seem to work.
my query looks like this:-
select convert(varchar,modif_time,101),count(*) from TEMP_TABLE group by
convert(varchar,modif_time,101) order by convert(varchar,modif_time,101)
when I run it, the output looks like :-
01/01/2001
01/01/2002
01/01/2003
01/02/2001
01/02/2002
01/02/2003
01/03/2000
01/03/2001
01/03/2002
01/03/2003
As you can see, the sort order seems to be first 2 chars, then the next
2 chars and so on. I want it to be
01/03/2000
01/01/2001
01/02/2001
01/03/2001
01/01/2002
01/02/2002
01/03/2002
01/01/2003
01/02/2003
01/03/2003
this is the right date format. Is this possible? Any help
will be appreciated.
Thanks
*** Sent via Developersdex
http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!