The ADD_MONTHS function adds (or subtract if the second parameter is negative) the specified number of months to the given date. The resulting day of the month and the given date are the same. However, if the day of the month of the given date is the last day of the month, the resulting date always falls on the last day of the month.

Note
  • Any fractional part for the number of months parameter is truncated before calculation.
  • If the given date contains a time portion, the time portion is carried forward without changing the result.

Examples

SELECT ADD_MONTHS('13-JUN-07',4) FROM DUAL;

     add_months
--------------------
 13-OCT-07 00:00:00
(1 row)

SELECT ADD_MONTHS('31-DEC-06',2) FROM DUAL;

     add_months
--------------------
 28-FEB-07 00:00:00
(1 row)


SELECT ADD_MONTHS('31-MAY-04',-3) FROM DUAL;

     add_months
--------------------
 29-FEB-04 00:00:00
(1 row)