title: Failing when casting to DateTime object
body: <p>I have this CSV</p>
  
  <pre><code>"06/04/2016 17:24:14,1443.92,0.31"
  </code></pre>
  
  <p>Which I try to convert into the following object</p>
  
  <pre><code>public class FooModel
  {
      public DateTime Date { get; set; }
      public DateTime Time { get; set; }
      public string Index { get; set; }
      public string Change { get; set; }
  }
  </code></pre>
  
  <p>with the following code</p>
  
  <pre><code>    string[] values = line.Split(',');
      FooModel m = new FooModel
      {
          Date = DateTime.ParseExact(values[0], "dd/MM/yyyy", CultureInfo.InvariantCulture),
          Time = DateTime.ParseExact(values[0], "H:mm:ss", CultureInfo.InvariantCulture),
  CultureInfo.InvariantCulture),
          Index = values[1],
          Change = values[2],
      };
  </code></pre>
  
  <p>and failing on the exception </p>
  
  <blockquote>
    <p>"String was not recognized as a valid DateTime."</p>
  </blockquote>
  
  <p>How can I cast to <code>DateTime</code> Object</p>
  
  <p><strong>EDIT</strong></p>
  
  <p>I saw couple of answers that almost worked however it was my bad to mention that the date is formatted as Day-Month-Year. this means that it is failing when the csv is set to "22/12/2014 16:24:04,1476.83,-0.74"</p>