title: DateTime.ParseExact() - DateTime pattern 'y' appears more than once with different values
body: <p>I have spent a day trying to get <code>DateTime.ParseExact()</code> to work based on this correctly answered question at <a href="https://stackoverflow.com/questions/5366285/parse-string-to-datetime-in-c-sharp">Parse string to DateTime in C#</a> however, I cannot get the answer to work.</p>
  
  <p>Here is my code:</p>
  
  <pre><code>string testDateRaw = @"2014-05-21 10:08:15.965";
  string format = "yyyy-MM-dd H:mm:ss.yyy";
  DateTime testDate = DateTime.ParseExact(testDateRaw, format, CultureInfo.InvariantCulture);
  System.Console.WriteLine(testDate); 
  </code></pre>
  
  <p>Error:</p>
  
  <blockquote>
    <p>DateTime pattern 'y' appears more than once with different values.</p>
  </blockquote>
  
  <p>Note: error reported in original version of the post does not show up in this sample, but may be related:</p>
  
  <blockquote>
    <p>"When converting a string to DateTime, parse the string before putting each variable into the DateTime object."</p>
  </blockquote>