title: convert string to datetime format invalid System.Datetime
body: <p>I have been trying many different solutions found here but none works. I want to convert the string to the format of dd/MM/yyyy</p>
  
  <pre><code>editField["ExpiryTime"] = "5/19/2011 12:00:00 AM";
  DateTime dt = DateTime.ParseExact(editField["ExpiryTime"].ToString(), "dd/MM/yyyy HH:mm:ss tt",  CultureInfo.InvariantCulture);
  </code></pre>
  
  <p>But I always get an error of invalid System.DateTime. Pleaes help!</p>