How to get start date and end date from week number in stored procedure
2 Answers
Know the answer? Post it. Somebody with the same question will find it here.
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend4days leftRegister
Dorababu MekaRank #457 · 5.5K reputationPosted Jan 29, 2011, 12:09 AM EST
SET DATEFIRST 4 /* or use any other weird value to test it */ DECLARE @d DATETIME SET @d = GETDATE() SELECT @d ThatDate, DATEADD(dd, (@@DATEFIRST + 5 + DATEPART(dw, @d)) % 7, @d) Monday, DATEADD(dd, 6 - (@@DATEFIRST + 5 + DATEPART(dw, @d)) % 7, @d) SundaySuthish NairRank #92 · 22.8K reputationPosted Jan 30, 2011, 8:32 AM EST
So other members can easily find the answers.