C# Formatting DateTime to a String
Often times you find yourself needing to convert a DateTime object into a useful string representation. Here are some basic parameters to the DateTime.ToString() method. MM/dd/yyyy 08/25/2010 dddd, dd MMMM yyyy Tuesday, 25 August 2010 dddd, dd MMMM yyyy HH:mm Tuesday, 25 August 2010 06:30 dddd, dd MMMM yyyy hh:mm tt Tuesday, 25 August 2010 06:30 AM dddd, dd MMMM yyyy H:mm Tuesday, 25 August 2010 6:30 dddd, dd MMMM yyyy h:mm tt Tuesday, 25 August 2010 6:30 AM dddd, dd MMMM yyyy HH:mm:ss Tuesday, 25 August 2010 06:30:07 MM/dd/yyyy HH:mm 08/25/2010 06:30 MM/dd/yyyy hh:mm tt 08/25/2010 06:30 AM MM/dd/yyyy H:mm 08/25/2010 6:30 MM/dd/yyyy h:mm tt 08/25/2010 6:30 AM MM/dd/yyyy h:mm tt 08/25/2010 6:30 AM MM/dd/yyyy h:mm tt 08/25/2010 6:30 AM MM/dd/yyyy HH:mm:ss 08/25/2010 06:30:07 MMMM dd August 25 MMMM dd August 25 yyyy'-'MM'-'dd'T'HH':'mm':'ss.fffffffK 2010-08-25T06:30:07.7199252-04:...