AddMonths Function

  • Updated

The AddMonths function adds a specified number of months to a DateTime value.

Syntax

 

The AddMonths function adds a specified number of months to a DateTime value.

 

AddMonths(dateTime, numMonths)

 

 

Arguments:

 

 

 

dateTime

DateTime - The base date and time.

 

 

numMonths

Integer - The number of months to add. A negative value will subtract months.

Remarks

  • Example: AddMonths("5/1/2000", 2) returns 7/1/2000.
  • Example: AddMonths("5/1/2000", -2) returns 3/1/2000.

Was this article helpful?

0 out of 0 found this helpful

Comments

0 comments

Article is closed for comments.