Using Date Arithmetic : Date Arithmetic « Date Timestamp Functions « Oracle PL/SQL Tutorial






You can use the addition and subtraction operators with date type value.

You can add a number, representing a number of days, to a date.

The following example adds 2 days to July 31, 2003, and displays the resulting date:

SQL> SELECT TO_DATE('31-JUL-2003') + 2 FROM dual;

TO_DATE('
---------
02-AUG-03

SQL>








13.26.Date Arithmetic
13.26.1.Using Date Arithmetic
13.26.2.Subtracts two days from August 2, 2003
13.26.3.Subtract one date from another, yielding the number of days between the two dates.
13.26.4.select date '1996-01-29' + interval '1' month as col_1
13.26.5.select date '1997-08-11' - interval '3' month as col_3
13.26.6.Second Tuesday of the Month