oracle中的时间查询
2016-12-13 16:55
232 查看
sql语句:
select * from date_test dt where dt.date_test >= to_date('2014/6/18 10:10:00','yyyy/mm/dd hh24:mi:ss') and dt.date_test < to_date('2016/6/28','yyyy/mm/dd');
to_date()函数,第一个可以是字符串值,第二个是转换结果的时间格式,hh24表示24小时制,hh表示12小时制
也可以用:
select * from date_test dt where dt.date_test between to_date('2014/6/18 10:10:00','yyyy/mm/dd hh24:mi:ss') and to_date('2016/6/28','yyyy/mm/dd');
select * from date_test dt where dt.date_test >= to_date('2014/6/18 10:10:00','yyyy/mm/dd hh24:mi:ss') and dt.date_test < to_date('2016/6/28','yyyy/mm/dd');
to_date()函数,第一个可以是字符串值,第二个是转换结果的时间格式,hh24表示24小时制,hh表示12小时制
也可以用:
select * from date_test dt where dt.date_test between to_date('2014/6/18 10:10:00','yyyy/mm/dd hh24:mi:ss') and to_date('2016/6/28','yyyy/mm/dd');
相关文章推荐
- oracle时间查询
- oracle关于日期时间的查询
- oracle 时间查询
- oracle时间查询
- ORACLE查询月初和月底时间
- 谁来救急啊.ORACLE中具体时间的查询,
- 查询oracle下没有时间戳的表中的记录插入时间
- oracle查询时间
- oracle 查询时间段
- oracle 伪例灵活查询时间段
- Oracle查询中,将unix时间转换成Oracle时间
- oracle sql 时间查询
- Oracle中时间查询问题(时间是String型)
- oracle中 查询时间管理
- oracle查询时间的判断
- java oracle 日期时间模糊查询的方法
- Oracle中多表查询再按时间倒序
- oracle 所有时间查询selectto_char(sysdate,'fmww')fromdual
- oracle时间类型的查询
- Oracle 时间字段的时区转换的一些常用查询语句