Formatting Patterns
Note: the same patterns are used for both formatting and parsing monetary amounts.
The supported pattern characters are:
S outputs the currencies symbol e.g. $.
C outputs part of the currency code e.g. USD. You can specify 1,2 or 3 C's. Specifying CCC will output the full code regardless of its length.
C - U
CC - US
CCC - USD - outputs the full currency code regardless of length.
denotes a digit.
0 denotes a digit and and forces padding with leading and trailing zeros.
, (comma) a placeholder for the grouping separtor
. (period) a place holder for the decimal separator
Examples:
Last updated