`
frinder
  • 浏览: 35964 次
  • 性别: Icon_minigender_1
  • 来自: 上海
社区版块
存档分类
最新评论

hibernate查询oracle中Date类型数据设置的一种方法

 
阅读更多

第一步:得到“yyyy-mm-dd”类型的字符串,如“2011-03-18”;

第二步:使用to_date('', 'yyyy-mm-dd hh:mi:ss')构建hql语句,

如:from Employee as e where e.hiredate = to_date('2011-03-23', 'yyyy-mm-dd hh:mi:ss')

如此设置,便可在oracle中查询了!!!


分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics