title: .NET LINQ foreach DATETIME cannot convert String to DateTime exception
body: <p>I have SQL data table that containes a DATE or DATETIME field</p>
  
  <p>a LINQ statement show here just to get the basic idea </p>
  
  <pre><code>var testLinq = from t in DBDataContext.Certificates select t;
  
      foreach (var t in testLinq)
      {
       ....
      }
  </code></pre>
  
  <p>Left out the code in {..} for briefness.
  BUT whenever 'foreach' tries to use t I get this exception </p>
  
  <blockquote>
    <p>"Input string was not in a correct
    format." When converting a string to
    DateTime, parse the string to take the
    date before putting each variable into
    the DateTime Object</p>
  </blockquote>
  
  <p>How can I do this when its handled by Linq inside the foreach loop?              </p>