Date添加天、小时、分、秒
select date_name+1 next_day from dual;
select date_name+1/24 next_hour from dual;
select date_name+1/(24*60) next_minute from dual;
select date_name+1/(24*60*60) next_second from dual;
两个Date类型字段:START_DATE,END_DATE,计算这两个日期的时间差(分别以天,小时,分钟,秒,毫秒):
天: ROUND(TO_NUMBER(END_DATE - START_DATE))
小时: ROUND(TO_NUMBER(END_DATE - START_DATE) * 24)
分钟: ROUND(TO_NUMBER(END_DATE - START_DATE) * 24 * 60)
秒: ROUND(TO_NUMBER(END_DATE - START_DATE) * 24 * 60 * 60)
毫秒: ROUND(TO_NUMBER(END_DATE - START_DATE) * 24 * 60 * 60 * 1000)