Symbol | Type | Representation |
C | Currency: | (123.00) |
D | Decimal | -123 |
E | Scientific | -1.234500E+002 |
F | Fixed point | -123.45 |
G | General (default) | -123 (default = 'G') |
N | Number | -123.00 |
P | Percent | -12,345.00 % |
R | Round-trip | -123.45 |
X | Hexadecimal | FFFFFF85 |
Date Time Formatting | ||
Symbol | Type | Representation |
d | Short date | 07/09/2007 |
D | Long date | Monday, 09 July 2007 |
t | Short time | 13:42 |
T | Long time | 13:42:50 |
f | Full date/short time | Monday, 09 July 2007 13:42 |
F | Full date/long time | Monday, 09 July 2007 13:42:50 |
g | General date/short time | 07/09/2007 13:42 |
G | General date/long time (default) | 07/09/2007 13:42:50 (default = 'G') |
M | Month | July 20 |
R | RFC1123 | Mon, 09 Jul 2007 13:42:50 GMT |
s | Sortable | 2007-07-09T13:42:50 |
u | Universal sortable | 2007-07-09 13:42:50Z (invariant) |
U | Universal full | Monday, 09 July 2007 20:42:50 |
Y | Year | 2007 July |
Standard Enumeration Formatting | ||
G | General (default) | Green (default = 'G') |
F | Flags | Green (flags or integer) |
D | Decimal number | 3 |
X | Hexadecimal | 00000003 |
Reference: String.Format - MSDN
1 comment:
a good post after long time.
.net rocks
Post a Comment