Format Specifiers
The Format String Editor makes use of a few special characters known as Format Specifiers. These characters allow you to specify how you want the content of the control to be formatted. Below is a list of each of the categories that appears in the editor.
The DateTime category is excluded from this documentation as the Preview in the Format String Editor sufficiently demonstrates the outcome of applying each of the Format Specifiers.
For more information on Format Specifiers see Using Standard Numeric Format Strings, and Using Custom Numeric Format Strings.
Number
Format Specifier |
Description |
Example |
---|---|---|
#.00 |
Specifies that the number has two digits after the decimal. |
|
#,# |
Specifies that a comma should be used as the thousands separator. |
|
0.E+0.0 |
Converts a number into a string in a custom scientific notation. Specifies the following conversion elements:
|
|
0.e+0.0 |
Converts a number into a string in a custom scientific notation. Specifies the following conversion elements:
|
|
n |
Converts a number to a string. Commas are used as the thousands separator. |
|
n0 |
Converts a number to a string with no digits after the decimal place. Commas are used as the thousands separator. |
|
n1 |
Converts a number to a string with one digit after the decimal place. Commas are used as the thousands separator. |
|
n2 |
Converts a number to a string with two digits after the decimal place. Commas are usedas the thousands separator. |
|
e |
Converts a number into a string in scientific notation. |
|
e1 |
Converts a number into a string in scientific notation. Specifies one digit after the decimal place. |
|
f |
Converts a number into a string with no commas as the thousands separator. |
|
f1 |
Converts a number into a string with no commas as the thousands separator. Specifies one digit after the decimal place. |
|
Percent
Format Specifier |
Description |
Example |
---|---|---|
0.00% |
Multiplies a number by 100 and converts it to a string. Specifies two digits after the decimal place. |
|
0% |
Multiplies a number by 100 and converts it to a string. Specifies no decimal places. |
|
Currency
Format Specifier |
Description |
Example |
---|---|---|
$0.00 |
Converts a number into a string using the dollar sign as a currency indicator. Specifies two digits after the decimal place. |
|
$0 |
Converts a number into a string using the dollar sign as a currency indicator. Specifies no digits after the decimal place. |
|
c |
Converts a number into a string that represents a currency amount. Defaults to two decimal places. The currency value displayed corresponds with the culture of the client application. |
|
c1 |
Converts a number into a string that represents a currency amount. Specifies one digit after the decimal place. The currency value displayed corresponds with the culture of the client application. |
|
c2 |
Converts a number into a string that represents a currency amount. Specifies two digits after the decimal place. The currency value displayed corresponds with the culture of the client application. |
|
Special
Format Specifier |
Description |
Example |
---|---|---|
(###)###-#### |
Formats a number into a phone number appearance. |
|
###-##-#### |
Formats a number into a custom configuration. |
|