title: String To Datetime 5/7/2013 07:42 53 AM C#
body: <p>I want to convert string to Datetime Format.
  I am suing the following code but its giving me error.
  Please help.</p>
  
  <pre><code> DateTime dtCurrentFile =  DateTime.ParseExact(" 5/7/2013 07:42 53 AM ","d/M/yyyy HH:mm ss",null);
  </code></pre>
  
  <p>I am getting exception as:</p>
  
  <blockquote>
    <p>String was not recognized as a valid DateTime.</p>
  </blockquote>