Senthilkumar

Senthilkumar

  • NA
  • 10.8k
  • 4m

Error in conversion

Jul 26 2012 2:02 AM
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)