How Can We Help?
Introduction:
In this tutorial, we are going to explain how to use Oracle ADD_MONTHS function with basic syntax and many examples for better understanding.
ADD_MONTHS adds a number of months to a date.
Syntax:
ADD_MONTHS( date, number_months )
Name | Description |
date | The date you want to add months to eg, sysdate. |
number_months | The number of months. You want to add to the date. You can use negative sign to subtract from the date. |
Applies to::
Oracle 19c, Oracle 18c, Oracle 12c, Oracle 11g, Oracle 10g, Oracle 9i, Oracle 8i
Examples:
Let’s take some examples about Oracle ADD_MONTHS and how to use it:
SELECT ADD_MONTHS('01-Jan-20', 5)
FROM DUAL;
SELECT ADD_MONTHS('01-Jan-20', -5)
FROM DUAL;
SELECT ADD_MONTHS(sysdate, 1)
FROM DUAL;
Similar functions to Oracle ADD_MONTHS:
NEXT_DAY : returns the date of the next weekday specified.
ADD_MONTHS : add number of months to a date.
In this tutorial, you have learned how to use the Oracle ADD_MONTHS function to add number of months to a date .
Hopefully, it was clear and concise.