我有一个问题 需要用hibernate按时间查询,某时间以后的所有纪录
where += " and b.begintime >= '" + baobiao.getBegintime() + "'";
这个语句bigintime需要一个timestemp对象..而我给的也是一个timestemp为什么老是报"文字与格式字符串不匹配"的错误..请那位高手帮我解决下..如果我一开始写就是错的...请把写好的代码给我看下..在下不胜感激!!!
where += " and b.begintime >= '" + baobiao.getBegintime() + "'";
这个语句bigintime需要一个timestemp对象..而我给的也是一个timestemp为什么老是报"文字与格式字符串不匹配"的错误..请那位高手帮我解决下..如果我一开始写就是错的...请把写好的代码给我看下..在下不胜感激!!!
hql1 = c.starttime < to_date('" + endtime + "','yyyy-mm-dd HH24:MI:SS')"
连的是orcale 数据库,应该有些象 to_date这类的函数吧,
希望对你有帮助!