Home Forums SQL Server 2005 T-SQL (SS2K5) DatePart week and year end RE: DatePart week and year end
octagonbi
Grasshopper
Points: 11
More actions
January 11, 2013 at 2:00 pm
#1576499
I just came across this and created a case statement to get around this.
CASE WHEN DATEPART(ww,Driver_summary.Dor_date)=53 THEN 1 ELSE DATEPART(ww,Driver_summary.Dor_date) END AS WeekNum