select * from table where pay_date-getdate()<=50

解决方案 »

  1.   

    在Query的SQL语句中写入'Select * from table where getdate()-table.pay_date>=50'
      

  2.   

    adodateset.close;
    adodateset.comandtext='Select * from 表名 where pay_date<=getdate()-50';
    adodateset.open;
      

  3.   

    select * from table where pay_date-getdate()<=50
      

  4.   

    也可以用参数SQL语句select * from tabel where pay_date - GetDate() > :days
    调用
    adodateset.close;
    adodateset.SQL.add( select * from tabel where pay_date - GetDate() > :days)
    adodateset.Parameters.ParamByName("days").DateType = ftDate;
    adodateset.Parameters.ParamByName("days").value = 50;//差异天数
    adodateset.open;
    这个方法通用高些。