How to put the date in descending order.

searchsanjaysharma
searchsanjaysharma used Ask the Experts™
on
I have dates stored in this format.
doa
2012-01-31 00:00:00.000
2012-03-31 15:14:48.233
2012-03-30 03:51:39.120
2012-03-29 03:51:39.120

If i write the query as
select convert(varchar,doa,106) from mststudents order by 1
31 Mar 2012
31 Jan 2012
30 Mar 2012
29 Mar 2012

But i want the the output in descending order.
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Software Applications Developer / Integrator
Commented:
Try this

select convert(varchar,doa,106) from mststudents order by doa desc

Author

Commented:
ok

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial