title: CsvHelper parse csv and convert string to DateTime
body: <p>I am working with CsvHelper and being able to parse csv file. My question is how can I parse the <code>Date</code> into <code>DateTime</code> object</p>
  
  <p>I want to convert it via CsvHelper while it is parsing the csv rather than iterating the collection</p>
  
  <pre><code>public static List&lt;StockModel&gt; SplitCsv(string csv)
  {
      var textReader = new StringReader(csv);
  
      var csvr = new CsvReader(textReader);
      csvr.Configuration.RegisterClassMap&lt;ModelMap&gt;();
  
      var records = csvr.GetRecords&lt;StockModel&gt;().ToList();
      return records;
  }
  
  public class StockModel
  {
      public string Date { get; set; } // I want this object to be DateTime
      public string Base { get; set; }
      public string Open { get; set; }
  }
  
  public sealed class ModelMap : CsvClassMap&lt;StockModel&gt;
  {
      public ModelMap()
      {
          Map(m =&gt; m.Date);
          Map(m =&gt; m.Base);
          Map(m =&gt; m.Open);
      }
  }
  </code></pre>
  
  <p>CSV example</p>
  
  <pre><code>Date,Base,Open
  2016-02-29,1437.530029,1445.839966
  2016-02-25,1431.439941,1431.439941
  2016-02-24,1430.459961,1432.430054
  </code></pre>