With this function you can increment a given datetime value by a specific number of months, and it will return the new datetime value.
date_inc_month( date, amount );
Argument | Type | Description |
---|---|---|
date | Datetime | The datetime to add to. |
amount | Real | The number of months (must be an integer) to add. |
mynewdatetime = date_inc_month(date_current_datetime(), 12);
This would set "mynewdatetime" to the current date but with 12 months added.