I have this Calendar table (code below) based on the Date and then Calculated columns. The problem is that it returns me 53rd weeks because of the logic 52 * 7 = 364 so actually we
Solution 1:
In SQL Server 2008+, you can use the following:
SELECT DATEPART(ISO_WEEK, <DATE>)
The following SO question discusses other methods to derive the ISO week:
Post a Comment for "T-sql Calculated Column How To Get Iso Week Number"