DateTime.Now; 3/14/2011 12:45:24 AM
DateTime.Now.ToString(); 3/14/2011 12:45:24 AM
DateTime.Now.ToShortTimeString() 12:45 AM
DateTime.Now.ToShortDateString() 3/14/2011
DateTime.Now.ToLongTimeString() 12:45:24 AM
DateTime.Now.ToLongDateString() Monday, March 14, 2011

DateTime.Now.ToString(“d”) 3/14/2011
DateTime.Now.ToString(“D”) Monday, March 14, 2011
DateTime.Now.ToString(“f”) Monday, March 14, 2011 12:45 AM
DateTime.Now.ToString(“F”) Monday, March 14, 2011 12:45:24 AM
DateTime.Now.ToString(“g”) 3/14/2011 12:45 AM
DateTime.Now.ToString(“G”) 3/14/2011 12:45:24 AM
DateTime.Now.ToString(“m”) March 14
DateTime.Now.ToString(“r”) Mon, 14 Mar 2011 00:45:24 GMT
DateTime.Now.ToString(“s”) 2011-03-14T00:45:24
DateTime.Now.ToString(“t”) 12:45 AM
DateTime.Now.ToString(“T”) 12:45:24 AM
DateTime.Now.ToString(“u”) 2011-03-14 00:45:24Z
DateTime.Now.ToString(“U”) Monday, March 14, 2011 5:45:24 AM
DateTime.Now.ToString(“y”) March, 2011
DateTime.Now.ToString(“dddd, MMMM dd yyyy”) Monday, March 14 2011
DateTime.Now.ToString(“ddd, MMM d “‘”yy”) Mon, Mar 14 ’11
DateTime.Now.ToString(“dddd, MMMM dd”) Monday, March 14
DateTime.Now.ToString(“M/yy”) 3/11
DateTime.Now.ToString(“dd-MM-yy”) 14-03-11

Thank you . .

Advertisements