-- ############################################################################################# -- -- %Purpose: Date arithmetic with Oracle (e.g. How to add 1 [sec] to a date ?) -- -- You can add and subtract number constants as well as other dates -- from dates. Oracle interprets number constants in arithmetic date -- expressions as numbers of days. For example, SYSDATE + 1 is tomorrow. -- SYSDATE - 7 is one week ago. SYSDATE + (10/1440) is ten minutes from now. -- Subtracting the HIREDATE column of the EMP table from SYSDATE returns -- the number of days since each employee was hired. You cannot multiply -- or divide DATE values. Oracle provides functions for many common date -- operations. For example, the ADD_MONTHS function lets you add or subtract -- months from a date. The MONTHS_BETWEEN function returns the number of -- months between two dates. The fractional portion of the result represents -- that portion of a 31-day month. -- -- ############################################################################################# -- set serveroutput on; declare   oldDate DATE;   newDate DATE; begin   oldDate := to_date('31.12.1999:23:59:59','DD.MM.YYYY:HH24:MI:SS');   newDate := oldDate + 1/86400;   dbms_output.put_line(   'newDate=' ||to_char(newDate,'DD.MM.YYYY:HH24:MI:SS'); end; / newDate=01.01.2000:00:00:00 PL/SQL procedure successfully completed.