sql sever如何根据一天日期遍历出本周七天
range函数可以用
RANGE(dateInWeek("2018-12-12", 1), DATEDELTA("2018-12-12", 0))
select * from tb where datediff(week, 时间字段 ,getdate()) = 0
取周开始日期:dateInWeek($日期,1)
取周结束日期:dateInWeek($日期,-1)