1
Answer

Error in conversion

Senthilkumar

Senthilkumar

12y
1.5k
1
The below code gives error.

CultureInfo ci = CultureInfo.InvariantCulture;
string archTime = "7/25/2012 11:26:22 AM";
DateTime dt1 = DateTime.ParseExact(archTime, "MM/dd/yyyy hh:mm", ci);

Exception message is

String was not recognized as a valid DateTime.





Answers (1)