Date functions – add_months
The Oracle/PLSQL date function ADD_MONTHS adds exactly the specified number of months to the specified date. The number can be positive or negative.
Syntax:
ADD_MONTHS(DATE, number_of_months_to_add)
Example code:
SELECT SYSDATE, ADD_MONTHS(SYSDATE, 3) FROM dual
sysdate add_months
————————————————-
12/31/2009 2:47:42 AM 3/31/2010 2:47:42 AM
SELECT SYSDATE, TRUNC(ADD_MONTHS(SYSDATE, -2)) FROM dual
sysdate add_months
———————————
12/31/2009 10/31/2009
Filed Under: PLSQL - Date Manipulation