首页 > 代码库 > PostgreSql问题:ERROR: operator does not exist: timestamp without time zone > character varying
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 && alarmStartTime!=‘‘">
AND alarm_start_time > #{alarmStartTime}
</if>
<if test="alarmEndTime!=null && alarmEndTime!=‘‘">
AND alarm_end_time < #{alarmEndTime}
</if>
PostgreSql问题:ERROR: operator does not exist: timestamp without time zone > character varying
声明:以上内容来自用户投稿及互联网公开渠道收集整理发布,本网站不拥有所有权,未作人工编辑处理,也不承担相关法律责任,若内容有误或涉及侵权可进行投诉: 投诉/举报 工作人员会在5个工作日内联系你,一经查实,本站将立刻删除涉嫌侵权内容。