日期:2014-05-18 浏览次数:20600 次
select convert(varchar(10),DATEADD(DD,-7,GETDATE()),120) (无列名) 2012-03-06 select * from tb where DATEDIFF(DD,表的日期字段,getdate())=7
------解决方案--------------------
select dateadd(wk,-1,getdate())
------解决方案--------------------
select dateadd(wk,-1,getdate()) ----------------------- 2012-03-06 09:08:13.090 (1 行受影响)
------解决方案--------------------
select cast(dateadd(ww,-1,getdate()) as date) 'r' r ---------- 2012-03-06