Convert string to DateTime and format
Can i convert the string below to DateTime
Friday, 27th September 2013
This is what i want to achieve:
String tmpDate="Friday, 27th September 2013";
closingDate = Convert.ToDateTime(tmpDate).ToString("yyyy-MM-dd");
Doing above i get error:
The string was not recognized as a valid DateTime. There is an unknown
word starting at index 10.
No comments:
Post a Comment