发布网友 发布时间:2022-04-27 11:22
共1个回答
热心网友 时间:2023-09-14 23:56
months_between(d2,d1) 两间差几月
select (d2-d1) from al; 相差少
select (d2-d1)*24 from al; 相差少
select (d2-d1)*24*60 from al; 相差少钟
select (d2-d1)*24*60*60 from al; 相差少秒
字符串转换date类型
to_date('20141212 00:00:00','yyyymmdd hh24:mi:ss')
select (to_date('20141212 00:00:00','yyyymmdd hh24:mi:ss')-to_date('20140112 00:00:00','yyyymmdd hh24:mi:ss')) from al;