_add_months
Adds "integer_expression" months to "date_expression". If the resulting month has fewer days than the day of month component, then the last day of the resulting month is returned. In all other cases the returned value has the same day of month component as "date_expression".
Syntax
_add_months ( date_expression, integer_expression )
Example 1
_add_months ( 2012-04-15 , 3 )
Result
2012-07-15
Example 2
_add_months ( 2012-02-29 , 1 )
Result
2012-03-29
Example 3
_last_of_month ( _add_months ( 2012-02-29 , 1 ) )
Result
2012-03-31
Example 4
_add_months ( 2012-01-31 , 1 )
Result
2012-02-29
Example 5
_add_months ( 2002-04-30 12:10:10.000 , 1 )
Result
2002-05-30 12:10:10.000