Utilities.IncMonth Method

Applies to TestComplete 15.69, last modified on November 13, 2024
This method is obsolete. See the Remarks section below.

Description

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

Declaration

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:

Parameters

The method has the following parameters:

Date

A Variant value storing date and time.

NumberOfMonths

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.

Remarks

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