I am trying to convert the following string to a DateTime value in c#:
1 March 2012
But I keep getting this error when calling Convert.ToDateTime or DateTime.Parse.
String was not recognized as a valid DateTime.
I think a custom date format needs to be used but I have no idea what the format would be.
How can I convert a string in the format above to a DateTime value?
1 Answer