title: Error “String was not recognized as a valid DateTime”
body: <p>I have these 2 string values:</p>
  
  <ul>
  <li><p><code>Test1 = "2020-01-29T00:00:00Z"</code></p></li>
  <li><p><code>Test2 = "29/01/2020 00:00:00"</code></p></li>
  </ul>
  
  <p>and I am doing this comparison:</p>
  
  <pre><code>(DateTime.ParseExact(Test2.ToString(), "dd/M/yyyy hh:mm:ss tt", CultureInfo.InvariantCulture).ToString("yyyy'-'MM'-'dd'T'00':'00':'00'Z'") != (DateTime.ParseExact(Test1["ProjectDateSinged"].ToString(), "yyyy'-'MM'-'dd'T'00':'00':'00'Z'", CultureInfo.InvariantCulture)).ToString()))
  </code></pre>
  
  <p>but this will raise the following exception:</p>
  
  <blockquote>
    <p>Error “String was not recognized as a valid DateTime”</p>
  </blockquote>
  
  <p>Could anyone find what is wrong with my code?</p>