当前位置: 代码迷 >> ASP >> datefiff有关问题
  详细解决方案

datefiff有关问题

热度:214   发布时间:2012-02-10 21:27:41.0
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())