I am trying to run a simple query over a datestamp field defaulted with getdate(), using the convert function:
select convert(varchar(10),datestamp,103), count(*)
from table
group by convert(varchar(10),datestamp,103)
order by convert(varchar(10),datestamp,103)
The problem is that the results are only ordered by the DD part of the date.
Is there any simple solution to this problem ?
select convert(varchar(10),datestamp,103), count(*)
from table
group by convert(varchar(10),datestamp,103)
order by convert(varchar(10),datestamp,103)
The problem is that the results are only ordered by the DD part of the date.
Is there any simple solution to this problem ?