Utilities.CurrencyDecimals 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.CurrencyDecimals property to specify the number of digits after the decimal point in currency values.

Declaration

Utilities.CurrencyDecimals

Read-Write Property Integer

Applies To

The property is applied to the following object:

Property Value

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

Remarks

Utilities.CurrencyDecimals is obsolete and is supported for backward compatibility only. To get or set the number of digits after the decimal point in currency values, use the aqEnvironment.GetLocaleInfo and aqEnvironment.SetLocaleInfo with LOCALE_ICURRDIGITS functions as the second parameter.

JavaScript, JScript

var currency_decimals = aqEnvironment.GetLocaleInfo(LOCALE_USER_DEFAULT, LOCALE_ICURRDIGITS);
Log.Message(currency_decimals);

Python

currency_decimals = aqEnvironment.GetLocaleInfo(LOCALE_USER_DEFAULT, LOCALE_ICURRDIGITS)
Log.Message(currency_decimals)

VBScript

currency_decimals = aqEnvironment.GetLocaleInfo(LOCALE_USER_DEFAULT, LOCALE_ICURRDIGITS)
Log.Message currency_decimals

DelphiScript

currency_decimals := aqEnvironment.GetLocaleInfo(LOCALE_USER_DEFAULT, LOCALE_ICURRDIGITS);
Log.Message(currency_decimals);

C++Script, C#Script

var currency_decimals = aqEnvironment["GetLocaleInfo"](LOCALE_USER_DEFAULT, LOCALE_ICURRDIGITS);
Log["Message"](currency_decimals);

Or, if you want to convert currency values to strings using a locale format, use aqConvert.CurrencyToStr and aqConvert.CurrencyToFormatStr. These methods use locale-specific currency formats.

See Also

CurrencyToFormatStr Method
CurrencyToStr Method
FloatToStr Method
Format Method

Highlight search results