title: Failed to convert parameter value from a String to a DateTime
body: <p>I get an error while using command parameter with type <code>sqldbtype.datatime</code></p>
  
  <p>Here is the code I'm using</p>
  
  <pre><code> cmd.Parameters.Add("@Posted_date", SqlDbType.DateTime).Value = Convert.ToDateTime(dt.Rows[i]["messagePostedDate"]);
  </code></pre>
  
  <p>Error is "Failed to convert parameter value from a String to a DateTime" and value of dt.Rows[i]["messagePostedDate"] is "2008-10-01 00:00:00.000" – </p>
  
  <p>Does anyone know what might be the problem?</p>