ISO Week in SQL Server 2008 DATEPART fx

2/3/2011 8:15:44 PM

Finally we got it... This will make working with weeks in Europe a lot more easy.

From SQL Server 2008 there's better support for international standards week numbering, aka ISO week.


print DATEPART(isowk,'2010-01-04')  -- outputs 1 (first four days rule)
print DATEPART(wk,'2010-01-04')  -- outputs 2 (one day rule)