Utilities.IncMonth Method

Applies to TestComplete 14.0, last modified on January 23, 2019
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(DateNumberOfMonths)

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

aqDateTime.AddMonths Method
aqString.Format Method
aqDateTime.SetTimeElements Method
aqDateTime.SetDateElements Method
aqDateTime.GetMonth Method

Highlight search results