Table of Contents

AddMonths(date, add_months)

Category: Date and Time function


Description

This function adds add_months number of months to date. If add_months is negative, the months are subtracted.


Arguments

ArgumentTypeDescription
dateDate or Number (date serial)A expression representing a date. The date to add months to.
add_months Number The number of months to be added to date, or subtracted if negative.

Return value type: Number (date serial value).


Remarks

The date argument can take any value or expression that evaluates to a date serial value, with or without a time portion. Examples include:


Examples

addmonths(#2019-12-12, 2)  //Returns 43873 (Equivalent to 2020-Feb-12.)
addmonths(43811, 5)  //Returns 43963 (Equivalent to 2020-May-12.)
addmonths(#2019-12-12, -2)  //Returns 43720 (Equivalent to 2019-Oct-12; subtract months.)


See also