Use the following symbols to define the pattern:
Symbol | Description |
---|
. | Decimal Separator |
0 | Digit |
# | Optional Digit |
, | Grouping Separator |
¤
| Currency Sign |
% | Multiply by 100 and show as percentage |
‰ | Multiply by 1000 and show as per mille value |
' | Quote strings (to escape symbols) |
Here are two examples for Locale US.
If the content is 2342.738, the pattern give these results:
Pattern | Result |
---|
<Default> | 2342.738 |
0.00 | 2342.74 |
###,##0.00 | 2,342.74 |
¤ ##,##0.00
| $ 2,342.74 |
Assume the following value for the next example: 0.7832
Pattern | Result |
---|
<Default> | 0.7832 |
% | %78 |
%0.00 | %78.32 |
‰ | ‰783 |