title: String was not recognized as a valid DateTime with the format of "MM/dd/yyy hh:mm:ss tt"
body: <p>I'm trying to convert a string into a DateTime in C#, but I'm getting this error:</p>
  
  <blockquote>
    <p>System.FormatException: 'String was not recognized as a valid DateTime.'</p>
  </blockquote>
  
  <p>The error is in the next line:</p>
  
  <pre><code>DateTime endTime = DateTime.ParseExact(endDate, "MM/dd/yyyy hh:mm:ss tt", null);
  </code></pre>
  
  <p>My <code>endDate</code> variable has the following info: "10/03/2017 06:52:48 AM"</p>
  
  <p>What am I doing wrong?</p>