Utilities.LongDateFormat Property

Applies to TestComplete 12.60, last modified on September 17, 2018
This property is obsolete. See the Remarks section below.

Description

Use the Utilities.LongDateFormat property to specify the format string used to convert a date value to a string. For information about format specifiers, see Date and Time Format Specifiers.

Declaration

Utilities.LongDateFormat

Read-Write Property String

Applies To

The property is applied to the following object:

Property Value

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

Remarks

Utilities.LongDateFormat is obsolete and is supportedfor backward compatibility only. To get or set the long date format, use the aqEnvironment.GetLocaleInfo and aqEnvironment.SetLocaleInfo functions with LOCALE_SLONGDATE as the second parameter.

JavaScript, JScript

var long_date_format = aqEnvironment.GetLocaleInfo(LOCALE_USER_DEFAULT, LOCALE_SLONGDATE);
Log.Message(long_date_format);

Python

long_date_format = aqEnvironment.GetLocaleInfo(LOCALE_USER_DEFAULT, LOCALE_SLONGDATE)
Log.Message(long_date_format)

VBScript

long_date_format = aqEnvironment.GetLocaleInfo(LOCALE_USER_DEFAULT, LOCALE_SLONGDATE)
Log.Message long_date_format

DelphiScript

long_date_format := aqEnvironment.GetLocaleInfo(LOCALE_USER_DEFAULT, LOCALE_SLONGDATE);
Log.Message(long_date_format);

C++Script, C#Script

var long_date_format = aqEnvironment["GetLocaleInfo"](LOCALE_USER_DEFAULT, LOCALE_SLONGDATE);
Log["Message"](long_date_format);

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

See Also

Working With Dates
Date and Time Format Specifiers
aqDateTime.Time Method
aqDateTime.Today Method
aqDateTime.Now Method
aqConvert.DateTimeToStr Method
aqConvert.StrToDateTime Method
aqConvert.StrToDate Method

Highlight search results