Utilities.EncodeTime Method

Applies to TestComplete 15.47, last modified on January 20, 2023
This method is obsolete. See the Remarks section below.

Description

The Utilities.EncodeTime method returns a specific value calculated from the given hour, minute, second and millisecond.

Declaration

Utilities.EncodeTime(Hour, Min, Sec, MSec)

Hour [in]    Required    Integer    
Min [in]    Required    Integer    
Sec [in]    Required    Integer    
MSec [in]    Required    Integer    
Result Variant

Applies To

The method is applied to the following object:

Parameters

The method has the following parameters:

Hour

Specifies the hour of the time to be converted to a Variant value. The Hour parameter ranges between 0 and 23.

Min

Specifies the minute of the time to be converted to a Variant value. Valid Min values are 0 through 59.

Sec

Specifies the millisecond of the time to be converted to a Variant value. Valid MSec values are 0 through 999.

MSec

Result Value

The resulting value is a number between 0 and 1 (inclusive) that indicates the fractional part of a day given by the specified time or (if 1.0) midnight on the following day. The value 0 corresponds to midnight, 0.5 corresponds to noon, 0.75 corresponds to 6:00 pm, and so on.

Remarks

This method is obsolete. It is supported for backward compatibility only. To create a time value containing a specific number of hours, minutes and seconds, use the aqDateTime.SetTimeElements method.

See Also

Working With Time
SetTimeElements Method
GetHours Method
GetMinutes Method
GetSeconds Method
SetDateElements Method
Time Method
Now Method

Highlight search results