All the patterns:
0 --- MM/dd/yyyy --- 08/28/2008
1 --- dddd, dd MMMM yyyy --- Thursday, 28 August 2008
2 --- dddd, dd MMMM yyyy HH:mm --- Thursday, 28 August 2008 01:00
3 --- dddd, dd MMMM yyyy hh:mm tt --- Thursday, 28 August 2008 01:00 AM
4 --- dddd, dd MMMM yyyy H:mm --- Thursday, 28 August 2008 1:00
5 --- dddd, dd MMMM yyyy h:mm tt --- Thursday, 28 August 2008 1:00 AM
6 --- dddd, dd MMMM yyyy HH:mm:ss --- Thursday, 28 August 2008 01:00:44
7 --- MM/dd/yyyy HH:mm --- 08/28/2008 01:00
8 --- MM/dd/yyyy hh:mm tt --- 08/28/2008 01:00 AM
9 --- MM/dd/yyyy H:mm --- 08/28/2008 1:00
10 --- MM/dd/yyyy h:mm --- tt 08/28/2008 1:00 AM
11 --- MM/dd/yyyy HH:mm:ss --- 08/28/2008 01:00:44
12 --- MMMM dd --- August 28
13 --- MMMM dd August --- 28
14 --- yyyy'-'MM'-'dd'T'HH':'mm':'ss.fffffffK --- 2008-08-28T01:00:44.4829556-04:00
15 --- yyyy'-'MM'-'dd'T'HH':'mm':'ss.fffffffK --- 2008-08-28T01:00:44.4829556-04:00
16 --- ddd, dd MMM yyyy HH':'mm':'ss 'GMT' --- Thu, 28 Aug 2008 01:00:44 GMT
17 --- ddd, dd MMM yyyy HH':'mm':'ss 'GMT' --- Thu, 28 Aug 2008 01:00:44 GMT
18 --- yyyy'-'MM'-'dd'T'HH':'mm':'ss --- 2008-08-28T01:00:44
19 --- HH:mm --- 01:00
20 --- hh:mm tt --- 01:00 AM
21 --- H:mm --- 1:00
22 --- h:mm tt --- 1:00 AM
23 --- HH:mm:ss --- 01:00:44
24 --- yyyy'-'MM'-'dd HH':'mm':'ss'Z' --- 2008-08-28 01:00:44Z
25 --- dddd, dd MMMM yyyy HH:mm:ss --- Thursday, 28 August 2008 01:00:44
26 --- yyyy MMMM --- 2008 August
27 --- yyyy MMMM --- 2008 August
The patterns for DateTime.ToString ( 'd' ) :
0 --- MM/dd/yyyy --- 08/28/2008
The patterns for DateTime.ToString ( 'D' ) :
0 --- dddd, dd MMMM yyyy --- Thursday, 28 August 2008
The patterns for DateTime.ToString ( 'f' ) :
0 --- dddd, dd MMMM yyyy HH:mm --- Thursday, 28 August 2008 01:00
1 --- dddd, dd MMMM yyyy hh:mm tt --- Thursday, 28 August 2008 01:00 AM
2 --- dddd, dd MMMM yyyy H:mm --- Thursday, 28 August 2008 1:00
3 --- dddd, dd MMMM yyyy h:mm tt --- Thursday, 28 August 2008 1:00 AM
The patterns for DateTime.ToString ( 'F' ) :
0 --- dddd, dd MMMM yyyy HH:mm:ss --- Thursday, 28 August 2008 01:00:44
The patterns for DateTime.ToString ( 'g' ) :
0 --- MM/dd/yyyy HH:mm --- 08/28/2008 01:00
1 --- MM/dd/yyyy hh:mm --- tt 08/28/2008 01:00 AM
2 --- MM/dd/yyyy H:mm --- 08/28/2008 1:00
3 --- MM/dd/yyyy h:mm tt --- 08/28/2008 1:00 AM
The patterns for DateTime.ToString ( 'G' ) :
0 --- MM/dd/yyyy HH:mm:ss --- 08/28/2008 01:00:44
The patterns for DateTime.ToString ( 'm' ) :
0 --- MMMM dd --- August 28
The patterns for DateTime.ToString ( 'r' ) :
0 --- ddd, dd MMM yyyy HH':'mm':'ss 'GMT' --- Thu, 28 Aug 2008 01:00:44 GMT
The patterns for DateTime.ToString ( 's' ) :
0 --- yyyy'-'MM'-'dd'T'HH':'mm':'ss --- 2008-08-28T01:00:44
The patterns for DateTime.ToString ( 'u' ) :
0 --- yyyy'-'MM'-'dd HH':'mm':'ss'Z' --- 2008-08-28 01:00:44Z
The patterns for DateTime.ToString ( 'U' ) :
0 --- dddd, dd MMMM yyyy HH:mm:ss --- Thursday, 28 August 2008 01:00:44
The patterns for DateTime.ToString ( 'y' ) :
0 --- yyyy MMMM 2008 --- August
Different Formats :
http://www.csharp-examples.net/string-format-double/
http://idunno.org/archive/2004/14/01/122.aspx
Tuesday, December 16, 2008
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment