Utilities.ThousandSeparator 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.ThousandSeparator property to specify the character used to separate digits in numbers that have more than three digits before the decimal point.

Declaration

Utilities.ThousandSeparator

Read-Write Property String

Applies To

The property is applied to the following object:

Property Value

The string that holds the character used to separate digits in numbers that have more than three digits before the decimal point.

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

Remarks

Utilities.ThousandSeparator is obsolete and supported only for backward compatibility. To get or set the thousands separator, use aqEnvironment.GetLocaleInfo and aqEnvironment.SetLocaleInfo with LOCALE_STHOUSAND in the second parameter.

JavaScript, JScript

var th_sep = aqEnvironment.GetLocaleInfo(LOCALE_USER_DEFAULT, LOCALE_STHOUSAND);
Log.Message(th_sep);

Python

th_sep = aqEnvironment.GetLocaleInfo(LOCALE_USER_DEFAULT, LOCALE_STHOUSAND) Log.Message(th_sep)

VBScript

th_sep = aqEnvironment.GetLocaleInfo(LOCALE_USER_DEFAULT, LOCALE_STHOUSAND)
Log.Message th_sep

DelphiScript

th_sep := aqEnvironment.GetLocaleInfo(LOCALE_USER_DEFAULT, LOCALE_STHOUSAND);
Log.Message(th_sep);

C++Script, C#Script

var th_sep = aqEnvironment["GetLocaleInfo"](LOCALE_USER_DEFAULT, LOCALE_STHOUSAND);
Log["Message"](th_sep);

If you want to convert a locale-formatted string to a number, use aqConvert.StrToInt, aqConvert.StrToInt64, or aqConvert.StrToFloat. These methods use the locale-specific thousands and decimal separator when parsing values.

See Also

Working With Numeric Values
aqConvert.CurrencyToFormatStr Method
aqConvert.FloatToStr Method
aqString.Format Method

Highlight search results