--获取当天数据
where CONVERT(varchar(10),[CreateTime],120) =CONVERT(varchar(10),getDate(),120)
--获取当月数据
where month(CreateTime) = month(getdate())
--获取当周数据
where datediff(week , [CreateTime] ,getdate()) =2
--获取当天数据
where CONVERT(varchar(10),[CreateTime],120) =CONVERT(varchar(10),getDate(),120)
--获取当月数据
where month(CreateTime) = month(getdate())
--获取当周数据
where datediff(week , [CreateTime] ,getdate()) =2