Utilities.DateSeparator Property

Applies to TestComplete 14.0, last modified on January 23, 2019
This property is obsolete. See the Remarks section below.

Description

Use the Utilities.DateSeparator property to specify the character used to separate year, month and day in date values.

Declaration

Utilities.DateSeparator

Read-Write Property String

Applies To

The property is applied to the following object:

Property Value

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

Remarks

Utilities.DateSeparator is obsolete and is supported for backward compatibility only. To get or set the date separator, use the aqEnvironment.GetLocaleInfo and aqEnvironment.SetLocaleInfo functions with LOCALE_SDATE as the second parameter.

JavaScript, JScript

var date_separator = aqEnvironment.GetLocaleInfo(LOCALE_USER_DEFAULT, LOCALE_SDATE);
Log.Message(date_separator);

Python

date_separator = aqEnvironment.GetLocaleInfo(LOCALE_USER_DEFAULT, LOCALE_SDATE)
Log.Message(date_separator)

VBScript

date_separator = aqEnvironment.GetLocaleInfo(LOCALE_USER_DEFAULT, LOCALE_SDATE)
Log.Message date_separator

DelphiScript

date_separator := aqEnvironment.GetLocaleInfo(LOCALE_USER_DEFAULT, LOCALE_SDATE);
Log.Message(date_separator);

C++Script, C#Script

var date_separator = aqEnvironment["GetLocaleInfo"](LOCALE_USER_DEFAULT, LOCALE_SDATE);
Log["Message"](date_separator);

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

See Also

Working With Dates
aqString.Format Method
aqConvert.DateTimeToFormatStr Method
aqConvert.DateTimeToFormatStr Method
aqConvert.DateTimeToStr Method
aqDateTime.Today Method
aqDateTime.Now Method

Highlight search results