Utilities.EncodeTime Method

Applies to TestComplete 15.10, last modified on December 01, 2021
This method is obsolete. See the Remarks section below.


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


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:


The method has the following parameters:


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


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


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


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.


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