to_date('HandleTime','yyyy-mm-dd hh24:mi:ss')>=to_date('" & HandleTime & "','yyyy-mm-dd')

解决方案 »

  1.   

    select * from task where dept='公司办公室' and to_date('HandleTime','yyyy-mm-dd')>=to_date('2003-6-4 00:00:00','yyyy-mm-dd') and to_date('HandleTime','yyyy-mm-dd')'<=to_date('2003-6-26 23:59:59','yyyy-mm-dd')还是有错
      

  2.   

    select * from task where dept='公司办公室' and to_date('HandleTime','yyyy-mm-dd')>=to_date('2003-6-4 00:00:00','yyyy-mm-dd') and to_date('HandleTime','yyyy-mm-dd')<=to_date('2003-6-26 23:59:59','yyyy-mm-dd')还是有错
      

  3.   

    ('HandleTime','yyyy-mm-dd')'<=to_date('2003-6-26 23:59:59','yyyy-mm-dd hh24:mi:ss')关键是根据handletime字符串的格式,来确定后面的转换格式
    to_date中前面字符串和后面格式要相同
      

  4.   

    我已好了,把handletime改成date行了