在asp中查找10天以内的记录
一个页面,需要从库中(access)抽取10天以内的记录。该数据库,使用date字段存放时间,时间为自动函数date(),如何编写一个sql语句,取得10天以内的记录。
我查了过去的一些资料,使用datediff,以下:
sql="select title,date,id from news where datediff("d",date,date())>10 "
但是,iis提示
Error Type:
Microsoft VBScript compilation (0x800A0401)
Expected end of statement
/xxxnew/default.asp, line 286, column 52
sql="select title,date,id from news where datediff("d",date,date())>10 "
请问,该如何操作?