Utilities.TimePMString Property

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

Description

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

Declaration

Utilities.TimePMString

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 noon and midnight in the 12-hour format. By default, TimePMString holds the value that is specified by Regional Settings in the Windows Control Panel.

Remarks

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

JavaScript, JScript

var time_pm_string = aqEnvironment.GetLocaleInfo(LOCALE_USER_DEFAULT, LOCALE_S2359);
Log.Message(time_pm_string);

Python

time_pm_string = aqEnvironment.GetLocaleInfo(LOCALE_USER_DEFAULT, LOCALE_S2359)
Log.Message(time_pm_string)

VBScript

time_pm_string = aqEnvironment.GetLocaleInfo(LOCALE_USER_DEFAULT, LOCALE_S2359)
Log.Message time_pm_string

DelphiScript

time_pm_string := aqEnvironment.GetLocaleInfo(LOCALE_USER_DEFAULT, LOCALE_S2359);
Log.Message(time_pm_string);

C++Script, C#Script

var time_pm_string = aqEnvironment["GetLocaleInfo"](LOCALE_USER_DEFAULT, LOCALE_S2359);
Log["Message"](time_pm_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