Utilities.EncodeDate Method

Applies to TestComplete 15.64, last modified on May 16, 2024
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(Year, Month, Day)

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
SetDateElements Method
Today Method
Now Method
GetYear Method
GetMonth Method
GetDay Method
AddMonths Method
SetTimeElements Method

Highlight search results