datepart(ww,convert(datetime,'01/JAN/2005',113)) = 01
datepart(ww,convert(datetime,'31/DEC/2004',113)) = 53
with these conversions... I got my sale forecast data incorrect! can anyone help me solve this problem? It happened every year.
I want it like this
this is date format "dd/MMM/YYYY"
when 31/DEC/2004 is week 53 and 01/JAN/2005 should be week 53 as well. Because 07/JAN/2005 suppose to be the first week of the year. Unless 01/JAN/2005 fall on Monday.
show I write a store procedure to get the correct answer?