|
Format
|
Top Previous Next |
| P, or p: Displays number with thousandths separator multiplied by 100 with a percent sign (%) appended to the right and separated by a single space; always displays two digits to the right of the decimal separator.
|
| E, or e: Uses standard scientific notation, providing six significant digits.
|
| D, or d: Displays number as a string that contains the value of the number in Decimal (base 10) format. This option is supported for integral types (Byte, Short, Integer, Long) only.
|
| X, or x: Displays number as a string that contains the value of the number in Hexadecimal (base 16) format. This option is supported for integral types (Byte, Short, Integer, Long) only.
|
|
Format (Style)
|
"5" formatted as
|
"-5" formatted as
|
"0.5" formatted as
|
|
Zero-length string ("")
|
5
|
-5
|
0.5
|
|
0.00
|
5.00
|
-5.00
|
0.50
|
|
0
|
5
|
-5
|
1
|
|
#,##0
|
5
|
-5
|
1
|
|
$#,##0;($#,##0)
|
$5
|
($5)
|
$1
|
|
$#,##0.00;($#,##0.00)
|
$5.00
|
($5.00)
|
$0.50
|
|
0%
|
500%
|
-500%
|
50%
|
|
0.00%
|
500.00%
|
-500.00%
|
50.00%
|
|
0.00E+00
|
5.00E+00
|
-5.00E+00
|
5.00E-01
|
|
0.00E-00
|
5.00E00
|
-5.00E00
|
5.00E-01
|
|
|
|
|
|
|
Format
|
Display
|
|
M/d/yy
|
12/7/58
|
|
d-MMM
|
7-Dec
|
|
d-MMMM-yy
|
7-December-58
|
|
d MMMM
|
7 December
|
|
MMMM yy
|
December 58
|
|
hh:mm tt
|
08:50 PM
|
|
h:mm:ss t
|
8:50:35 P
|
|
H:mm
|
20:50
|
|
H:mm:ss
|
20:50:35
|
|
M/d/yyyy H:mm
|
12/7/1958 20:50
|
|
|
|