Order by descending date - month, day and year

前端 未结 6 600
Happy的楠姐
Happy的楠姐 2020-12-05 03:45

This seems stupid but, I simply need a list of dates to be ordered with the most recent date at top. Using order by DESC doesn\'t seem to be working the way I w

6条回答
  •  天涯浪人
    2020-12-05 04:31

    You have the field in a string, so you'll need to convert it to datetime

    order by CONVERT(datetime, EventDate ) desc
    

提交回复
热议问题