title: System.InvalidCastException: Specified cast is not valid
body: <p>I retrieve a table from the database that contains a column of type "time" in sql server, and I try to assign this to a DateTime variable but i get this error:
  System.InvalidCastException: Specified cast is not valid.</p>
  
  <p>here's my c# code:</p>
  
  <pre><code>DateTime StartTime = (DateTime)dt.Rows[i]["startTime"];
  </code></pre>
  
  <p>knowing that the column "startTime" is of type "time" and I can change it in the database.
  any help??</p>