Created
June 17, 2020 06:22
-
-
Save davidsheardown/4c4e8a6ba1013ae4c58bbddb1f99b8de to your computer and use it in GitHub Desktop.
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
/* | |
Get date as Monday of current week.. just change the "0" in the last param to whichever day you need | |
i.e. SELECT DATEADD(wk, DATEDIFF(wk,0,GETDATE()), 2) would return date as Wednesday of current week | |
Handy to do date between or greater than checks | |
*/ | |
SELECT DATEADD(wk, DATEDIFF(wk,0,GETDATE()), 0) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment