Purpose
This function adds a specified number of months to a date or timestamp.
Syntax
add_months::=
                                                                         
                                                                    
Usage Notes
- Decimals are rounded before adding that number.
- If the resulting month has fewer days than the day of the date of entry, the last day of the month is returned.
- If the input date is the last day of a month, then the last day of the resulting month is returned.
- For data type TIMESTAMP WITH LOCAL TIME ZONEthis function is calculated within the session time zone.
Example
Copy
                                                                
                                                            
                                                            SELECT ADD_MONTHS(DATE '2006-01-31', 1) AM1,
       ADD_MONTHS(TIMESTAMP '2006-01-31 12:00:00', 2) AM2;Result
| AM1 | AM2 | 
| 2006-02-2 | 2006-03-31 12:00:00.000000 |