首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 网站开发 > ASP >

datefiff有关问题

2012-02-10 
datefiff问题sql select*fromhafwhere[status] orderreceivedanddatediff( d ,end_date,date()) 7andd

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())

热点排行