I have string
in the following format: 16Mar2009 (mon) , but I am not able to convert to datetime
.
string format = "dMMMyyyy(dd)";
DateTime dt = DateTime.ParseExact("16Mar2009(mon)", format,CultureInfo.InvariantCulture);
Returns the following error:
String was not recognized as a valid DateTime.