14.03.2014 Views

Scripting Guide - SAS

Scripting Guide - SAS

Scripting Guide - SAS

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Chapter 6 Types of Data 119<br />

Currency<br />

Table 6.4 Date-Time Formats (Continued)<br />

Type Format argument Example<br />

Locale date “Locale Date” (Display only) “01/02/1999"<br />

Locale date and<br />

time<br />

“Locale Date Time h:m” (Display only) “01/02/1999 13:01“ or “01/<br />

02/1999 01:01 PM“<br />

“Locale Date Time<br />

h:m:s”<br />

(Display only) “01/02/1999 13:01:02“ or<br />

“01/02/1999 01:01:02 PM“<br />

Currency<br />

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

Format(x,"Currency", , );<br />

Where:<br />

• x is a column or a number<br />

• "currency code" is an International Standards Organization (ISO) 4217 code<br />

• decimal is the number of decimal places<br />

To illustrate the Format function:<br />

Format(12345.6, "Currency", "GBP", 3);<br />

"£12,345.600"<br />

If you do not specify the currency code, the currency symbol is based on the computer’s operating system<br />

locale. For example, running the following script in a Japanese operating system formats the number with<br />

the yen symbol.<br />

Format(12345.6, "Currency", 3);<br />

"¥12,345.600"<br />

If the currency code is not supported by JMP, the currency code string appears before the number.<br />

Format(12345.6, "Currency", "BBD", 3);<br />

"BBD 12,345.600"<br />

Table 6.5 lists the currencies supported in JMP.<br />

Table 6.5 Currencies Supported in JMP<br />

Code Currency Code Currency Code Currency<br />

AUD Australian dollar HKD Hong Kong dollar PHP Philippine peso<br />

BRL Brazilian real ILS Israeli new shekel PLN Polish zloty<br />

CAD Canadian dollar INR Indian rupee RUB Russian ruble

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!