How do you convert a string such as 2009-05-08 14:40:52,531 into a DateTime?
2009-05-08 14:40:52,531
DateTime
string txtDate="15-06-2020"; //dd-MM-yyyy var info= txtDate.Split('-').Select(Int32.Parse).ToList(); DateTime startDate = new DateTime(info[2], info[1], info[0]); //new DateTime (year,Month,day)