Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Oracle: How to add 6 months to current date

Tags:

In SQL Server I can do this to add 6 months to the current date:

DateAdd(Month, 6, CURRENT_DATE) 

What is the equivalent in Oracle?

like image 430
Cheryl Avatar asked May 24 '11 16:05

Cheryl


People also ask

What is ADD months function in Oracle?

Purpose. ADD_MONTHS returns the date date plus integer months. A month is defined by the session parameter NLS_CALENDAR . The date argument can be a datetime value or any value that can be implicitly converted to DATE . The integer argument can be an integer or any value that can be implicitly converted to an integer.

Which date function is used to add calendar months to date in Oracle?

ADD_MONTHS() function returns a date with a given number of months added (date plus integer months). A month is defined by the session parameter NLS_CALENDAR. A datetime value or any value that can be implicitly converted to DATE.

Which date function is used to add calendar months to date?

You can use the EDATE function to quickly add or subtract months from a date. The EDATE function requires two arguments: the start date and the number of months that you want to add or subtract.

What is ADD_MONTHS?

ADD_MONTHS adds the specified number of months to a date or timestamp value or expression. The DATEADD function provides similar functionality.


1 Answers

The equivalent is:

ADD_MONTHS( CURRENT_DATE, 6 ) 
like image 83
Steve Mayne Avatar answered Oct 29 '22 22:10

Steve Mayne