Date and Time Format Patterns
All
the patterns: | ||
---|---|---|
0 | MM/dd/yyyy | 07/27/2011 |
1 |
dddd, dd MMMM yyyy | Wednesday, 27 July 2011 |
2 | dddd, dd
MMMM yyyy HH:mm | Wednesday, 27 July 2011 08:40 |
3 | dddd, dd
MMMM yyyy hh:mm tt | Wednesday, 27 July 2011 08:40
AM |
4 | dddd, dd MMMM yyyy H:mm | Wednesday, 27 July 2011
8:40 |
5 | dddd, dd MMMM yyyy h:mm tt | Wednesday, 27 July 2011
8:40 AM |
6 | dddd, dd MMMM yyyy HH:mm:ss | Wednesday, 27 July
2011 08:40:28 |
7 | MM/dd/yyyy HH:mm | 07/27/2011
08:40 |
8 | MM/dd/yyyy hh:mm tt | 07/27/2011 08:40
AM |
9 | MM/dd/yyyy H:mm | 07/27/2011
8:40 |
10 | MM/dd/yyyy h:mm tt | 07/27/2011 8:40
AM |
11 | MM/dd/yyyy HH:mm:ss | 07/27/2011
08:40:28 |
12 | MMMM dd | July 27 |
13 | MMMM
dd | July
27 |
14 | yyyy'-'MM'-'dd'T'HH':'mm':'ss.fffffffK | 2011-07-27T0
8:40:28.2891564-04:00 |
15 | yyyy'-'MM'-'dd'T'HH':'mm':'ss.fffffffK | 2011-07-27T08:40:28.2891564-04:00 |
16 | ddd, dd MMM yyyy
HH':'mm':'ss 'GMT' | Wed, 27 Jul 2011 08:40:28 GMT |
17 | ddd,
dd MMM yyyy HH':'mm':'ss 'GMT' | Wed, 27 Jul 2011 08:40:28
GMT |
18 | yyyy'-'MM'-'dd'T'HH':'mm':'ss | 2011-07-27T08:40:28< /td> |
19 | HH:mm | 08:40 |
20 | hh:mm
tt | 08:40
AM |
21 | H:mm | 8:40 |
22 | h:mm
tt | 8:40
AM |
23 | HH:mm:ss | 08:40:28 |
24 | yyyy'-'MM
'-'dd HH':'mm':'ss'Z' | 2011-07-27 08:40:28Z |
25 | dddd, dd
MMMM yyyy HH:mm:ss | Wednesday, 27 July 2011
08:40:28 |
26 | yyyy MMMM | 2011
July |
27 | yyyy MMMM | 2011 July |
The patterns for
DateTime.ToString ( 'd' ) : | ||
---|---|---|
0 | MM/dd/yyyy | 07/27/2011 |
The patterns for
DateTime.ToString ( 'D' ) : | ||
---|---|---|
0 | dddd, dd MMMM
yyyy | Wednesday, 27 July 2011 |
The patterns for
DateTime.ToString ( 'f' ) : | ||
---|---|---|
0 | dddd, dd MMMM yyyy
HH:mm | Wednesday, 27 July 2011 08:40 |
1 | dddd, dd MMMM yyyy
hh:mm tt | Wednesday, 27 July 2011 08:40 AM |
2 | dddd, dd MMMM
yyyy H:mm | Wednesday, 27 July 2011 8:40 |
3 | dddd, dd MMMM
yyyy h:mm tt | Wednesday, 27 July 2011 8:40 AM |
The patterns for
DateTime.ToString ( 'F' ) : | ||
---|---|---|
0 | dddd, dd MMMM yyyy
HH:mm:ss | Wednesday, 27 July 2011 08:40:28 |
The patterns for
DateTime.ToString ( 'g' ) : | ||
---|---|---|
0 | MM/dd/yyyy HH:mm | 07/27/2011
08:40 |
1 | MM/dd/yyyy hh:mm tt | 07/27/2011 08:40
AM |
2 | MM/dd/yyyy H:mm | 07/27/2011
8:40 |
3 | MM/dd/yyyy h:mm tt | 07/27/2011 8:40
AM |
The patterns for DateTime.ToString ( 'G' )
: | ||
---|---|---|
0 | MM/dd/yyyy HH:mm:ss | 07/27/2011
08:40:28 |
The patterns for DateTime.ToString ( 'm' )
: | ||
---|---|---|
0 | MMMM dd | July 27 |
The patterns for
DateTime.ToString ( 'r' ) : | ||
---|---|---|
0 | ddd, dd MMM yyyy HH':'mm':'ss
'GMT' | Wed, 27 Jul 2011 08:40:28 GMT |
The patterns for
DateTime.ToString ( 's' ) : | ||
---|---|---|
0 | yyyy'-'MM'-'dd'T'HH':'mm':'ss | 2011-07-27T08:40:28 |
The patterns for DateTime.ToString ( 'u' )
: | ||
---|---|---|
0 | yyyy'-'MM'-'dd HH':'mm':'ss'Z' | 2011-07-27
08:40:28Z |
The patterns for DateTime.ToString ( 'U' )
: | ||
---|---|---|
0 | dddd, dd MMMM yyyy HH:mm:ss | Wednesday, 27 July 2011
08:40:28 |
The patterns for DateTime.ToString ( 'y' )
: | ||
---|---|---|
0 | yyyy MMMM | 2011 July |