Utilities.TimeAMString Property

Applies to TestComplete 15.69, last modified on November 13, 2024
This property is obsolete. See the Remarks section below.

Description

Use the Utilities.TimeAMString property to specify the suffix part of time values between midnight and noon in the 12-hour format.

Declaration

Utilities.TimeAMString

Read-Write Property String

Applies To

The property is applied to the following object:

Property Value

The string that holds the suffix part of time values between midnight and noon in the 12-hour format. By default, TimeAMString holds the value specified by Regional Settings in the Windows Control Panel.

Remarks

Utilities.TimeAMString is obsolete and is supported for backward compatibility only. To get or set a string containing AM (as part of a time value), use the aqEnvironment.GetLocaleInfo and aqEnvironment.SetLocaleInfo functions with LOCALE_S1159 (or LOCALE_SAM in Windows 10) as the second parameter.

JavaScript, JScript

var time_am_string = aqEnvironment.GetLocaleInfo(LOCALE_USER_DEFAULT, LOCALE_S1159);
Log.Message(time_am_string);

Python

time_am_string = aqEnvironment.GetLocaleInfo(LOCALE_USER_DEFAULT, LOCALE_S1159)
Log.Message(time_am_string)

VBScript

time_am_string = aqEnvironment.GetLocaleInfo(LOCALE_USER_DEFAULT, LOCALE_S1159)
Log.Message time_am_string

DelphiScript

time_am_string := aqEnvironment.GetLocaleInfo(LOCALE_USER_DEFAULT, LOCALE_S1159);
Log.Message(time_am_string);

C++Script, C#Script

var time_am_string = aqEnvironment["GetLocaleInfo"](LOCALE_USER_DEFAULT, LOCALE_S1159);
Log["Message"](time_am_string);

Or, if you want to format time values using 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
Today Method
Now Method
DateTimeToFormatStr Method
DateTimeToStr Method
StrToTime Method

Highlight search results