PostgreSql问题:ERROR: operator does not exist: timestamp without time zone > character varying

问题描述:

ERROR:  operator does not exist: timestamp without time zone > character varying

解决方法:

//注意此处的格式必须是 yyyy-mm-dd hh:mm:ss[.f…] 这样的格式,中括号表示可选,否则报错

Timestamp alarmStartTime = Timestamp.valueOf(“2011-05-09 11:49:45”);

Timestamp alarmEndTime = Timestamp.valueOf(“2011-05-09 11:49:45“);

condition.put(“alarmStartTime”, alarmStartTime);
condition.put(“alarmEndTime”, alarmEndTime);

<if test=”alarmStartTime!=null &amp;&amp; alarmStartTime!=””>
AND alarm_start_time &gt; #{alarmStartTime}
</if>
<if test=”alarmEndTime!=null &amp;&amp; alarmEndTime!=””>
AND alarm_end_time &lt; #{alarmEndTime}
</if>

    原文作者:海米傻傻
    原文地址: https://www.cnblogs.com/haimishasha/p/6700733.html
    本文转自网络文章,转载此文章仅为分享知识,如有侵权,请联系博主进行删除。
点赞