标签:用户 reg register -- this details tps get 链接
DECLARE @ThisWeekStartTime NVARCHAR(100),@ThisWeekEndTime NVARCHAR(100)--本周
SELECT @ThisWeekStartTime= CONVERT(nvarchar(10), DATEADD(wk, DATEDIFF(wk,0,DATEADD(dd, -1, getdate()) ), 0),121)--本周开始时间
SELECT @ThisWeekEndTime= CONVERT(nvarchar(10), DATEADD(wk, DATEDIFF(wk,0,DATEADD(dd, -1, getdate()) ), 6),121)--本周结束时间
select @ThisWeekStartTime [本周起始日],@ThisWeekEndTime [本周结束日]
--查询本周注册的新用户
select * from dbo.Accounts where RegisterDate>=DATEADD(wk, DATEDIFF(wk,0,DATEADD(dd, -1, getdate()) ), 0)
and RegisterDate<DATEADD(wk, DATEDIFF(wk,0,DATEADD(dd, -1, getdate()) ), 7)
————————————————
版权声明:本文为CSDN博主「China_Lzw」的原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接及本声明。
原文链接:https://blog.csdn.net/qq285679784/article/details/80643039
标签:用户 reg register -- this details tps get 链接
原文地址:https://www.cnblogs.com/Anthony518/p/12316205.html