SQL如何通过当前日期获取上周一日期
--当前时间 select getdate()--当前时间周的起始日期(以周一为例)select DATEADD(week,DATEDIFF(week,0,getdate()),0)--上周起始:select dateadd(week,-1,DATEADD(week,DATEDIFF(week,0,getdate()),0))--上上周起始:select dateadd(we...
转载
2019-06-21 02:37:03 ·
1871 阅读 ·
0 评论