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.
Comments
0 comments
Article is closed for comments.