表中signTime字段的值为2008-10-10 00:00:00
2008-10-10 01:00:00在页面中按时间查询信息我的sql是 "from Contract c where c.signTime = to_date('" + crmContract.getSignTime() + "','yyyy-mm-dd hh24:mm:ss'";hibernate  执行时 sql为 from com.cyc.services.crm.domaindata.CrmContract c where  c.signTime = to_date('Fri Oct 10 00:00:00 CST 2008','yyyy-mm-dd hh24:mm:ss'报错 expecting CLOSE, found 'null' 

解决方案 »

  1.   

    "from Contract c where c.signTime = to_date('" + crmContract.getSignTime() + "','yyyy-mm-dd hh24:mm:ss')"; 至少最后少一个括号
      

  2.   

    to_date('2008-01-02235959','YYYY-MM-DDhh24miss\')
      

  3.   

    oracle里面认识这个?to_date('Fri Oct 10 00:00:00 CST 2008','yyyy-mm-dd hh24:mm:ss') 
      

  4.   

    数据库不是oracle的,PostgreSQL 8.3 不知道有知道的不?