title: Convert string to datetime value in LINQ
body: <p>Suppose I have a table storing a list of datetime (yyyyMMdd) in <strong>String</strong> format.
  How could I extract them and convert them into DateTime format dd/MM/yyyy ?</p>
  
  <p>e.g. 20120101 -> 01/01/2012</p>
  
  <p>I have tried the following:</p>
  
  <pre><code>var query = from tb in db.tb1 select new { dtNew = DateTime.ParseExact(tb.dt, "dd/MM/yyyy", null); };
  </code></pre>
  
  <p>But it turns out the error saying that the ParseExact function cannot be recgonized.</p>