Table of Contents | ||
---|---|---|
|
...
Symbol | Location | Localized? | Meaning |
---|---|---|---|
0 | Number | Yes | Digit There is support for K, M, B abbreviations in custom formatting: 0.0K / 0.0M / 0.0B where "0" drives the number of digits (# can be used too). Example for number "44,774.13":
|
# | Number | Yes | Digit, zero shows as absent Examples of use:
|
. | Number | Yes | Decimal separator or monetary decimal separator |
- | Number | Yes | Minus sign |
, | Number | Yes | Grouping separator |
E | Number | Yes | Separates mantissa and exponent in scientific notation; need not be quoted in prefix or suffix |
; | Subpattern boundary | Yes | Separates positive and negative subpatterns (see details below the table) |
% | Prefix or Suffix | Yes | Multiply by 100 and show as percentage |
? (\u2030) | Prefix or Suffix | Yes | Multiply by 1000 and show as per million |
¤ (\u00A4) | Prefix or Suffix | No | Currency sign, replaced by currency symbol; if doubled, replaced by international currency symbol; if present in a pattern, the monetary decimal separator is used instead of the decimal separator |
' | Prefix or Suffix | No | Used to quote special characters in a prefix or suffix; for example, "'#'#" formats 123 to "#123"; to create a single quote itself, use two in succession, such as "# o''clock" |
If there is a semicolon in the pattern, then the first part (subpattern) is for positive values and the second is for negative ones, e.g. "#,##0.00;(#,##0.00)". Each subpattern has a prefix, a numeric part, and a suffix. If there is no explicit negative subpattern, the negative subpattern is the localized minus sign prefixed to the positive subpattern. That is, "0.00" alone is equivalent to "0.00;-0.00". If there is an explicit negative subpattern, it serves only to specify the negative prefix and suffix; the number of digits, minimal digits, and other characteristics are ignored in the negative subpattern. That means that "#,##0.0#;(#)" has precisely the same result as "#,##0.0#;(#,##0.0#)".
...