日期查询和处理
- 查询本周的所有日期
select convert(varchar(10),dateadd(dd,number,DATEADD(week,DATEDIFF(week,0,getdate()),0)),120) as dt from master..spt_values where type='P' and dateadd(dd,number,DATEADD(week,DATEDIFF(week,0,getdate()),0))<=DATEADD(week,DATEDIFF(week,0,getdate()),6)