如题
比如se;ect * from employee where In_date=????

解决方案 »

  1.   

    不是delphi的处理,数据库那边该怎样就是怎样,比如access库
    query1.sql.text:='select * from employee where In_date=#''2003-03-21 17:00:00''#'
      

  2.   

    Query1.SQL.Clear;
    Query1.SQL.Add('select * from employee where In_date = :dt');
    Query1.ParamByName('dt').AsDateTime := StrToDate('2003-1-1');
    Query1.Open;
      

  3.   

    看你用什么数据库
    ms sql就用上面那位大哥的东西
    oracle中
    select * from employee where In_date=to_date('yyyy-mm-dd','xxx')
      

  4.   

    sql server
    Query1.SQL.Add('select * from ddd where 违章时间>'''+datetostr(date())+'''')
    access
    Query1.SQL.Add('select * from ddd where 违章时间>'#+datetostr(date())+'#')