pattern: |
The number pattern to follow.
Character
|
Default char
|
Definition
|
zero-digit
|
0
|
Output a digit
|
digit
|
#
|
Output a digit, unless it is a redundant leading or trailing zero
|
decimal-separator
|
.
|
Separate the integer and fractional part of the number
|
grouping-separator
|
,
|
Separates groups of numbers
|
pattern-separator
|
;
|
Separates positive and negative format patterns
|
minus-sign
|
-
|
Negative number prefix
|
percent
|
%
|
Multiply by 100 and show as a percentage
|
per-mille
|
?
|
Multiply by 1000 and show as per-mille
|
apostrophe
|
'
|
Quotes special characters
|
Any other characters placed in the format pattern are output directly. The format pattern allows for specifying a different pattern for positive and negative values using the "pattern-separator" character (default ’;’). For example, the format pattern "#.00;(#.00)" will output "123.45" with "12345" and "(123.45)" with an input of "-12345". When using the grouping-separator, the number of digits per group will be set to the number of digits specified between the last grouping separator and the end of the integer.
The following willl output a number in a European style format, with a comma as a decimal
separator, and a full-stop as the grouping separator.
^[format_num 1234.5, "#.##0,00", "grouping-separator=’.’; decimal-separator=’,’"]
|
Will output "1.234,50".Note that the same format pattern without the third parameter specifiedwill output "1234.500".
Overriding the "zero-digit" will change what symbols are used instead of numbers, i.e.
^[format_num 1234.5, "#,##a.aa","zero-digit=’a’"]
|
Will output "b,cde.fa".
|