Calculate Sart and End OF week using week adn yerar(Sunday Start Date) -SQL SERVER
--start date and end date of the week from week number Converting week number to sunday date
DECLARE @WeekNum INT
, @YearNum char(4);
SELECT @WeekNum = 48
, @YearNum = 2014
-- once you have the @WeekNum and @YearNum set, the following calculates the date range.
SELECT DATEADD(wk, DATEDIFF(wk, 6, '1/1/' + @YearNum) + (@WeekNum-1), 6) AS StartOfWeek;
SELECT DATEADD(wk, DATEDIFF(wk, 5, '1/1/' + @YearNum) + (@WeekNum-1), 5) AS EndOfWeek;
Watch video Calculate Sart and End OF week using week adn yerar(Sunday Start Date) -SQL SERVER online without registration, duration hours minute second in high quality. This video was added by user GoPro 24 November 2014, don't forget to share it with your friends and acquaintances, it has been viewed on our site 2,27 once and liked it people.