SELECT DATEADD(wk, DATEDIFF(wk,0,GETDATE()), 0)
Current Week:
- Monday Date - SELECT DATEADD(wk, DATEDIFF(wk,0,GETDATE()), 0)
- Tuesday Date - SELECT DATEADD(wk, DATEDIFF(wk,0,GETDATE()), 0) + 1
- Sunday Date - SELECT DATEADD(wk, DATEDIFF(wk,0,GETDATE()), 0) + 6
In getting the Monday Date from the previous week, use SELECT DATEADD(wk, DATEDIFF(wk,0,GETDATE()), 0) - 7
No comments:
Post a Comment