amir.kachlon - Sunday, February 17, 2019 8:12 AM
I believe the following will do it for you for every week that the DATETIME datatype can handle except for dates < 07 Jan 1753 or dates > 25 Dec 9999.
SELECT Work_Week = (DATEPART(dy,DATEADD(dd,DATEDIFF(dd,'07 Jan 1753',SomeColumn)/7*7+6,'07 Jan 1753'))+6)/7
FROM dbo.SomeTable
--Jeff Moden
Change is inevitable... Change for the better is not.