1.在給定時間上加減天數 SQL> select to_char(to_date('20170531000000','yyyymmdd HH24:MI:SS')+4,'YYYYMMDDHH24MISS' )from dual ; >20170604000000 2.在給定時間上加減小時數 SQL>s ...
1.在給定時間上加減天數
SQL> select to_char(to_date('20170531000000','yyyymmdd HH24:MI:SS')+4,'YYYYMMDDHH24MISS' )from dual ;
---->20170604000000
2.在給定時間上加減小時數
SQL>select to_char(to_date('20170531000000','yyyymmdd HH24:MI:SS')+2/24,'YYYYMMDDHH24MISS') from dual;
---->20170531020000
總結:sysdate+1 加一天,sysdate+1/24 加一小時,sysdate+1/(24*60) 加一分鐘