title: Type of value has a mismatch with column typeCouldn't store the value. Expected type is MySqlDateTime
body: <p>I get the following error while executing the below code.</p>
  
  <blockquote>
    <p>"Type of value has a mismatch with column typeCouldn't store &lt;2015-02-14 11:26:07> in Purchase_Date Column.  Expected type is MySqlDateTime."</p>
  </blockquote>
  
  <pre><code>DataTable dt = dataGridView1.DataSource as DataTable;
  if (dt != null)
  {
      DataRow row = dt.NewRow();
      // set the field values as required                
      dt.Rows.Add( textBox1.Text, dateTimePicker1.Value); /*error in this line*/
      dataGridView1.DataSource = dt;
  }
  </code></pre>
  
  <p>How do I resolve it?</p>