日期:2014-05-17  浏览次数:20776 次

datefiff问题
sql= "select   *   from   haf   where   [status]= 'order   received '   and   datediff( 'd ',end_date,date())> 7   and   datediff( 'd ',end_date,date()) <=30 "我的目的是从haf表中查出end_date与当前时间相隔7到30天内的数据,并且[status]= 'order   received '   但是这语句好象有问题,请问要怎么改呢?

------解决方案--------------------
datediff(d,end_date,getdate())