oracle数据库 hql语句用between and 比较一段时间

来源:互联网 发布:access数据库查询设计 编辑:程序博客网 时间:2024/05/17 07:14

String hql = "select e from entity e where e.date between to_date('2011-10-1','yyyy-mm-dd hh24:mi:ss') and to_date('2011-11-24','yyyy-mm-dd hh24:mi:ss')";

to_date()后面的一个参数是格式化时间