addmonth()

Examples


The addmonth() function allows you to adjust the month portion of a date by a specified amount.

Syntax

addmonth(date, months)

Parameters

date – The date or datetime value you want to modify.

months – The number of months you wish to adjust the month portion of the date by.

Comments

If the day value of the date is more than the number of days in the new month, then the day value of the date will be reduced by as much as is necessary to bring it back into range. For instance, if one month is added to the date 1/31/93, the value returned is 2/28/93, not 2/31/93.

Return value

Date


Documentation Feedback