Created
April 22, 2015 02:26
-
-
Save farindra/835caea31bf4cd3348e0 to your computer and use it in GitHub Desktop.
get monday date of the week SQL Server
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
DECLARE @mydate DATETIME,@devval VARCHAR(50) | |
set @devval='2015-04-01' | |
SELECT @mydate = GETDATE() | |
-- Monday of Current Week | |
SELECT DATEADD(WEEK, DATEDIFF(WEEK, 0, @devval), 0), | |
'Monday of Current Week' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment