Utilities.CurrencyFormat Property

Applies to TestComplete 15.10, last modified on December 15, 2021
This property is obsolete. See the Remarks section below.

Description

Use the Utilities.CurrencyFormat property to specify the format string that is used for converting positive currency values to strings. This format is used, for example, by the FloatToStrF and FormatCurr functions. The format of negative currency values is specified by the NegCurrFormat property.

Declaration

Utilities.CurrencyFormat

Read-Write Property Integer

Applies To

The property is applied to the following object:

Property Value

CurrencyFormat can hold one of the following values:

Value Description
0 $1
1 1$
2 $ 1
3 1 $

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

Remarks

Utilities.CurrencyFormat is obsolete and is supported for backward compatibility only. To get or set the currency string format, use aqEnvironment.GetLocaleInfo and aqEnvironment.SetLocaleInfo with LOCALE_ICURRENCY as the second parameter.

JavaScript, JScript

var currency_format = aqEnvironment.GetLocaleInfo(LOCALE_USER_DEFAULT, LOCALE_ICURRENCY);
Log.Message(currency_format);

Python

currency_format = aqEnvironment.GetLocaleInfo(LOCALE_USER_DEFAULT, LOCALE_ICURRENCY)
Log.Message(currency_format)

VBScript

currency_format = aqEnvironment.GetLocaleInfo(LOCALE_USER_DEFAULT, LOCALE_ICURRENCY)
Log.Message currency_format

DelphiScript

currency_format := aqEnvironment.GetLocaleInfo(LOCALE_USER_DEFAULT, LOCALE_ICURRENCY);
Log.Message(currency_format);

C++Script, C#Script

var currency_format = aqEnvironment["GetLocaleInfo"](LOCALE_USER_DEFAULT, LOCALE_ICURRENCY);
Log["Message"](currency_format);

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

See Also

CurrencyToFormatStr Method
Format Method

Highlight search results