Utilities.EncodeDate Method

Applies to TestComplete 14.30, last modified on November 21, 2019
This method is obsolete. See the Remarks section below.

Description

The Utilities.EncodeDate method returns a specific value calculated from the given year, month and day.

Declaration

Utilities.EncodeDate(YearMonthDay)

Year [in]    Required    Integer    
Month [in]    Required    Integer    
Day [in]    Required    Integer    
Result Variant

Applies To

The method is applied to the following object:

Parameters

The method has the following parameters:

Year

Specifies the year of the date to be converted to a Variant value. The Year parameter ranges between 1 and 9999.

Month

Specifies the month of the date to be converted to a Variant value. Valid Month values are 1 through 12.

Day

Specifies the day of the month of the date to be converted to a Variant value. Valid Day values are 1 through 28, 29, 30, or 31, depending on the Month and Year values.

Result Value

The resulting value of EncodeDate indicates the number of days that have passed since 12/30/1899. Negative resulting values of this function mean that the day is earlier than 12/30/1899.

Remarks

This method is obsolete. It is supported for backward compatibility only. To create a date value with certain year, month and day parts, use the aqDateTime.SetDateElements method.

See Also

Working With Dates
aqDateTime.SetDateElements Method
aqDateTime.Today Method
aqDateTime.Now Method
aqDateTime.GetYear Method
aqDateTime.GetMonth Method
aqDateTime.GetDay Method
aqDateTime.AddMonths Method
aqDateTime.SetTimeElements Method

Highlight search results