datediff(week,zy_time,getdate())=0 //查询本周
datediff(month,zy_time,getdate())=0 //查询本月
本季:select * from table where datediff(qq,C_CALLTIME,getdate())=0前半年1-6,后半年7-12:select * from table where datepart(mm,C_CALLTIME)/7 = datepart(mm,getdate())/7
1. 当前系统日期、时间select getdate()
2. dateadd 在向指定日期加上一段时间的基础上,返回新的 datetime 值例如:向日期加上2天select dateadd(day,2,'2004-10-15') --返回:2004-10-17 00:00:00.000
3. datediff 返回跨两个指定日期的日期和时间边界数。select datediff(day,'2004-09-01','2004-09-18') --返回:17
4. datepart 返回代表指定日期