title: How to Convert String Date in DateTime form in ASP.NET C#
body: <p>I have a string Date which is coming from Database I need to parse or convert that String Date in DateTime form. Sharing the data and code as of now sharing the date which is coming from DB</p>
  
  <pre><code>String Date="7/19/2010 7:34:43 AM";
  
  // I am parsing in DateTime form by below code
  
  Date= DateTime.Parse(Date).ToString("yyyy-MM-dd HH:mm:ss.fff");
  </code></pre>
  
  <p>But I am getting the error while parsing with existing code as <strong>String was not recognized as a valid DateTime.</strong>
  Can anyone please share some info how can I resolve this error so that I wont receive any exception</p>
  
  <p>Note </p>
  
  <p>Issue with my code is the date which is coming from Database is not a valid string type that's why I am getting the error string is not recognized as valid datetime</p>