-------------------------------
id|name|date    |isfahuo
-----------------------------
1 |A   |2008-1-1|0
2 |B   |2008-4-5|1
---------------------------如果isfahuo字段为0,用sql得到现在的时间,然后减去data里面的时间,如果大于三天 ,则用dbgrid显示出来  

解决方案 »

  1.   


    select * from table
    where (GetDate()-Dat3)>3 and isfahuo=0
      

  2.   

    select * from table 
    where (GetDate()-Date)>3 and isfahuo=0
      

  3.   

    wo 用的是access数据库,getdate()函数未定义,,怎么解决??
      

  4.   

    access中:AdoQuery1.Sql.Text:='select * from table  where ('+IntToStr(Trunc(Now))+'-Date)>3 and isfahuo=0'
      

  5.   

    已经解决了,access中 getdate()应该换成now,
    还是谢谢了,立刻把分给你们