Gunakan DATEADD
Demo Penguji Ulang
DECLARE @y INT = 2015,
@w INT = 37;
SELECT
[StartOfWeek] = DATEADD(wk,DATEDIFF(wk,7,CAST(@y AS NVARCHAR(100))) + (@w-1),7);
Gunakan DATEADD
Demo Penguji Ulang
DECLARE @y INT = 2015,
@w INT = 37;
SELECT
[StartOfWeek] = DATEADD(wk,DATEDIFF(wk,7,CAST(@y AS NVARCHAR(100))) + (@w-1),7);