Monetary and Numeric Formatting

The edit parameter lets you specify codes that format a string as numeric or monetary output:

Code
Description
n[m]
n is a number, 0 through 9, that specifies the number of decimal places to display. If you specify 0 for n, the value is rounded to the nearest integer. The output is padded with zeros or rounded to the nth decimal place, if required.

m specifies how to descale the value:

  • A value of 0 descales the value by the current precision.
  • A value of 1 through 9 descales the value by m minus the current precision.

If you do not specify m, the default value is 0. The default precision is 4.

$
Prefixes a dollar sign to numeric output.
F
Prefixes a franc sign to numeric output.
,
Inserts a comma to separate thousands.
Z
Suppresses leading zeros. It returns an empty string if the value is 0.
E
Surrounds negative numbers with angle brackets.
C
Appends cr to negative numbers.
D
Appends db to positive numbers.
B
Appends db to negative numbers.
M
Appends a minus sign to negative numbers.
N
Suppresses a minus sign on negative numbers.
T
Truncates a number rather than rounding it.
Y
If NLS is enabled, prefixes the yen/yuan character to the value.

The E, M, C, D and N options define numeric representations for monetary use, using prefixes or suffixes. If NLS is enabled, these options override the numeric and monetary conventions set for the current locale.