Dec 15, 2014

How to get first & last day of the previous Week

Below given script may help you.

This query wil return first day of the previous Week


SELECT CONVERT(DATE,DATEADD(WK, DATEDIFF(WK, 0, GETDATE()) - 1, 0)) First_Day_Of_Prev_Week

This query wil return last day of the previous Week


SELECT CONVERT(DATE,DATEADD(WK, DATEDIFF(WK, 0, GETDATE()) - 1, 0) + 6) Last_Day_OF_Prev_Week



This query will return first day of the current week

SELECT CONVERT(DATE,DATEADD(WK, DATEDIFF(WK, 0, GETDATE()) , 0))