You can use picture strings to control the formatting of time, date, integer,
and double values.
The time field formats use these keys.
| h |
hours, measured using a 12-hour clock, not padded (1,
2, 3, etc.) |
| hh |
hours, measured using a 12-hour clock, padded (01,
02, 03, etc.) |
| H |
hours, measured using a 24-hour clock, not padded (1,
2, 3, etc.) |
| HH |
hours, measured using a 24-hour clock, padded (01,
02, 03, etc.) |
| mm |
minutes |
| ss |
seconds |
The date field formats use these keys.
| m |
month, not padded (1, 2, 3, etc.) |
| d |
day, not padded (1, 2, 3, etc.) |
| y |
year, in four digits (1996) |
| mm |
month, padded (01, 02, 03, ... 10, 11, 12) |
| dd |
day, padded (01, 02, 03, ... 29, 30, 31) |
| yy |
year, final two digits (96) |
| yyyy |
year, in four digits (1996) |
| Mmm |
abbreviation for month, mixed case (Jan, Feb, Mar,
etc.) |
| Mmmm |
month, mixed case (January, February, March, etc.) |
| . |
-1000.5 |
Negatives represented by a minus sign. Period used as
decimal separator. |
| .0 |
-1001 |
Rounded up or down as necessary (no decimal used). |
| ,. |
-1,000.5 |
Negatives represented by a minus sign. Comma used as
thousands separator. Period used as decimal separator. |
| ,.0 |
-1,001 |
Rounded up or down as necessary (no decimal used).
Negatives represented by a minus sign. Comma used as thousands separator.
Period used as decimal separator. |
| ( . ) |
(1000.5) |
Negatives represented by parentheses. Period used as
decimal separator. |
| ( .0 ) |
(1001) |
Rounded up or down as necessary (no decimal used).
Negatives represented by parentheses. Period used as decimal separator. |
| ( ,. ) |
(1,001.5) |
Negatives represented by parentheses. Comma used as
thousands separator. Period used as decimal separator. |
| ( ,.0 ) |
(1,001) |
Rounded up or down as necessary (no decimal used).
Negatives represented by parentheses. Comma used as thousands separator. Period
used as decimal separator. |
| $,.2 |
-$10,000.50 |
Negatives represented by a minus sign. Comma used as
thousands separator. Period used as decimal separator. Two decimal places
required (padded with zeros, if necessary). |
| ($,.2) |
($10,000.50) |
Negatives represented by parentheses. Comma used as
thousands separator. Period used as decimal separator. Two decimal places
required (padded with zeros, if necessary). |
| .% |
-46.5% |
Negatives represented by a minus sign. Period used as
decimal separator. Numbers are not converted to percentages (0.345 = 0.345%). |
| .0% |
-47% |
Rounded up or down as necessary (no decimal used).
Negatives represented by a minus sign. Period used as decimal separator.
Numbers are not converted to percentages (0.345 = 0.345%). |
| (.%) |
(46.5%) |
Negatives represented by parentheses. Period used as
decimal separator. Numbers are not converted to percentages (0.345 = 0.345%). |
| (.0%) |
(47%) |
Rounded up or down as necessary (no decimal used).
Negatives represented by parentheses. Period used as decimal separator. Numbers
are not converted to percentages (0.345 = 0.345%). |