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()后面的一个参数是格式化时间
本文探讨了在SQL查询中使用to_date()函数选择特定时间区间内的记录,并详细解释了日期格式化的过程。
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()后面的一个参数是格式化时间
2015
8360

被折叠的 条评论
为什么被折叠?