获取上周的周一和周日
代码:
--start of last week SELECT DATEADD(wk, DATEDIFF(wk, 6, GETDATE()), 0) --end of last week SELECT DATEADD(wk, DATEDIFF(wk, 6, GETDATE()), 6)