1、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')"; 2、如果只涉及日期,没有时分秒可以使用tochar,比较字符串进行 hql = "from CTimesReg r where r.CStation.siteId='"+staNum+"' and to_char(r.observtime,'YYYY-mm-dd') between '"+start+"' and '"+end+"'";