[Solved] Converting this string to a date [closed]


You can do this with ParseExact by specifying the format like this:

var datestring = "9/4/2015 12:09:06 PM";
var dt = DateTime.ParseExact(datestring, "M/d/yyyy h:mm:ss tt", CultureInfo.InvariantCulture);

Depending if its 9th april or 4th september you can use d/M or M/d.

3

solved Converting this string to a date [closed]