select sysdate from dual

解决方案 »

  1.   

    能否说清楚点?下面的是否合用?
    select * from table1 where fdate=to_date('2002-5-24 12:21:21','yyyy-mm-dd hh24:mi:ss')
      

  2.   

    steel1991(随想曲)   谢谢你,你能说的具体一点吗?  我查 to_date 没有这个函数
      

  3.   

    to_date是ORACLE的函数
    Delphi的函数是DatetimeToStr
      

  4.   

    var
      sql:string;
    begin
     sql:='select * from table1 where fdate=to_date(''+ DateTimeToStr(now)+',''yyyy-mm-dd hh24:mi:ss'')'; 
    end;
      

  5.   

    newwen(玩一会儿) 兄弟说了
      

  6.   

    var
      sql:string;
    begin
     sql:='select * from table1 where fdate=to_date(''+ DateTimeToStr(now)+',''yyyy-mm-dd hh24:mi:ss'')'; 
    end;适用于oracle
      

  7.   

    须注意引号。下面应没问题:
    var
      sql:string;
    begin
     sql:='select * from table1 where fdate=to_date(''2002-5-5 16:13:20'',''yyyy-mm-dd hh24:mi:ss'') ';