My column Week Ending Date is Datetime
I am using the above convert... to make it into 09/15/2012. but when I sort it descending I get dates of 09/08/2012 first, since its a character, so it puts September last year first.
I want May of this year 05/21/2013 first and September last year, last.
DougP
Code:
Select ResourceLastName, ResourceFirstName, Manager,
convert(nvarchar(12),CAST(WeekEndDate as Date),101) as WeekEndDate, ApprovedBy
from dbo.SOWTimeReporting Where ApprovedBy = 'NotYetApproved'
Order by WeekEndDate desc
I want May of this year 05/21/2013 first and September last year, last.
DougP