I came over this little gem in our (C#) code today (formatted for clarity). It converts a date from a log to a DateTime object.
var s="04/03 06:06:00" //< Example input var d = DateTime.Now; d = new DateTime(2010, //year Convert.ToInt32(s.Substring(3, 2)), //month Convert.ToInt32(s.Substring(0, 2)), //day Convert.ToInt32(s.Substring(6, 2
(
Read more... )