Adds a given number of months to a given date.
Date | DateTime.AddMonths(Numeric-expression)
Where:
Date | DateTime
Is an attribute or variable based on the Date/DateTime data type, to which the method will add a certain number of months.
Numeric-expression
Is the number of months added to the given Date | DateTime.
Type returned:
Date | DateTime
Data Types:
Date,
DateTime
Returns a value that results from adding a number of months to a given date or date with time.
The result data type will be the same as the given original value (Date or DateTime).
If the numeric expression is negative, the months are subtracted from the given date.
&ExpirationDate = &Today.AddMonths(1) //This line can be included, for example, in a Procedure Source or in an Event
Event 'Calculates Expiration DateTime'
&Now=Now() //&Now is a variable based on the DateTime data type
&ExpirationDateTime = &Now.AddMonths(1)
Endevent
AddMth function
AddYears method
AddDays method