Utilities.IncMonth Method

Applies to TestComplete 15.10, last modified on December 01, 2021
This method is obsolete. See the Remarks section below.


Use the Utilities.IncMonth method to increment the value of the Date parameter by NumberOfMonths months and get this value.


Utilities.IncMonth(Date, NumberOfMonths)

Date [in]    Required    Variant    
NumberOfMonths [in]    Optional    Integer Default value: 1   
Result Variant

Applies To

The method is applied to the following object:


The method has the following parameters:


A Variant value storing date and time.


Specifies the number of months by which you want to increment the specified date. NumberOfMonths can be negative, to return a date several months earlier.

Result Value

The Date incremented by the specified number of months.


If the input day of the month is greater than the last day of the resulting month, the day is set to the last day of the resulting month. The time of the day specified by the Date parameter is copied to the result.

This method is obsolete. It is supported for backward compatibility only. To add a number of months to or subtract them from a date value, use the aqDateTime.AddMonths method.

See Also

AddMonths Method
Format Method
SetTimeElements Method
SetDateElements Method
GetMonth Method

Highlight search results