Join Wintertainment 2021 to share your stories, have fun, earn community badges, and more!

Utilities.LongTimeFormat Property

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

Description

Use the Utilities.LongTimeFormat property to specify the format string used to convert time values to a string holding hours, minutes and seconds. For more information about format specifiers, see Date and Time Format Specifiers.

Declaration

Utilities.LongTimeFormat

Read-Write Property String

Applies To

The property is applied to the following object:

Property Value

The string used to convert time values to a string.

By default, LongTimeFormat holds the value specified by Regional Settings in the Windows Control Panel. To restore this value, call the GetFormatSettings method.

Remarks

Utilities.LongTimeFormat is obsolete and is supported only for backward compatibility. To get or set the long time format, use the aqEnvironment.GetLocaleInfo and aqEnvironment.SetLocaleInfo functions with LOCALE_STIMEFORMAT as the second parameter.

JavaScript, JScript

var long_time_format = aqEnvironment.GetLocaleInfo(LOCALE_USER_DEFAULT, LOCALE_STIMEFORMAT);
Log.Message(long_time_format);

Python

long_time_format = aqEnvironment.GetLocaleInfo(LOCALE_USER_DEFAULT, LOCALE_STIMEFORMAT)
Log.Message(long_time_format)

VBScript

long_time_format = aqEnvironment.GetLocaleInfo(LOCALE_USER_DEFAULT, LOCALE_STIMEFORMAT)
Log.Message long_time_format

DelphiScript

long_time_format := aqEnvironment.GetLocaleInfo(LOCALE_USER_DEFAULT, LOCALE_STIMEFORMAT);
Log.Message(long_time_format);

C++Script, C#Script

var long_time_format = aqEnvironment["GetLocaleInfo"](LOCALE_USER_DEFAULT, LOCALE_STIMEFORMAT);
Log["Message"](long_time_format);

Or, if you want to process time values using the locale settings, use the methods of the aqDateTime object. They use locale-specific time formats when parsing values.

See Also

Working With Time
Date and Time Format Specifiers
Time Method
Today Method
Now Method
DateTimeToStr Method
StrToDateTime Method
StrToTime Method

Highlight search results