For the latest version of JMP Help, visit JMP.com/help.


Scripting Guide > Types of Data > Format Currency
Publication date: 04/21/2023

Format Currency

JMP displays numbers as currency using the Format() function, which uses the following syntax:

Format(x,"Currency", <"currency code">, <decimal>, < << Use Locale(Boolean));

Where:

x is a column or a number

"currency code" is an International Standards Organization (ISO) 4217 code

decimal is the number of decimal places

To illustrate the Format function:

Format( 12345.6, "Currency", "GBP", 3 );

"£12,345.600"

By default, the operating system locale is used for the currency if the currency code symbol is omitted. For example, running the following script in a Japanese operating system formats the number with the yen symbol.

Format( 12345.6, "Currency", 3);

"¥12,345.600"

To ignore the computer’s locale and use a period for the decimal separator, include the Use Locale(0) argument:

Format( 12345.6, "Currency", 3, <<Use Locale( 0 ) );

Tip: If you change the region when JMP is open, restart JMP for the Use Locale setting to work properly.

If the currency code is not supported by JMP, the currency code string appears before the number.

Format( 12345.6, "Currency", "BBD", 3 );

"BBD 12,345.600"

Table 6.6 lists the currencies supported in JMP.

Table 6.6 Currencies Supported in JMP

Code

Currency

Code

Currency

Code

Currency

AUD

Australian dollar

ILS

Israeli new shekel

RUB

Russian ruble

BRL

Brazilian real

INR

Indian rupee

SEK

Swedish krone

CAD

Canadian dollar

JPY

Japanese yen

SGD

Singapore dollar

CHF

Swiss franc

KRW

South Korean won

THB

Thai baht

CNY

Chinese yuan

MXN

Mexican peso

TRY

New Turkish lira

COP

Colombian peso

MYR

Malaysian ringgit

TWD

New Taiwan dollar

DKK

Danish krone

NOK

Norwegian krone

USD

US dollar

EUR

Euro

NZD

New Zealand dollar

ZAR

South African rand

GBP

British pound

PHP

Philippine peso

HKD

Hong Kong dollar

PLN

Polish zloty

For more information about how to format currency, see Format Numbers.

Want more information? Have questions? Get answers in the JMP User Community (community.jmp.com).