title: Failed to convert parameter value from a Int32 to a DateTime
body: <p>I searched all webs and didn't find any solution for my problem. I am new to c# and stack overflow community but am really stuck in this issue.  </p>
  
  <p>I have a button to add date and time separately into a <code>datagridview</code>. While filling the rows  i am saving row values in SQL Server  but its giving exception   <code>Failed to convert parameter value from a Int32 to a DateTime</code> when i send it database.data type in c# and SQL Server  is <code>Datetime</code> </p>
  
  <p><strong>Here's the code of adding date and time to datagridview</strong></p>
  
  <pre><code>private void addDateTime2_Click(object sender, EventArgs e)
  {
      int n = dataGridView2.Rows.Add();
      dataGridView2.Rows[n].Cells[0].Value =  dateTimePicker9.Value.ToString("dd-MM-yyyy");
      dataGridView2.Rows[n].Cells[1].Value = dateTimePicker7.Value.ToString("HH:mm:ss"); 
  }
  </code></pre>
  
  <p><strong>Here's the code that i insert to database:</strong></p>
  
  <pre><code>for (int i = 0; i &lt; dataGridView2.Rows.Count; i++)
      {
      string StrQuery = "INSERT INTO [dbo].[callRedirect]  (ISFsectionId, callRedirectDate, incidentNo, callRedirectTime, callRedirectGrade, callRedirectFName, callRedirectLName, callRedirectSerialNo, callRedirectRemark) VALUES (@ISFsectionId, @callRedirectDate, @incidentNo, @callRedirectTime, '" 
  + dataGridView2.Rows[i].Cells["Column12"].Tag + "', '" + dataGridView2.Rows[i].Cells["Column13"].Value + "', '" + dataGridView2.Rows[i].Cells["Column14"].Value + "', '" + dataGridView2.Rows[i].Cells["Column20"].Value + "', '" + dataGridView2.Rows[i].Cells["Column19"].Value + "')";
      SqlCommand cmd = cnn.CreateCommand();
      cmd.CommandText = StrQuery;
      cmd.Parameters.AddWithValue("@incidentNo", textBox4.Text);
      cmd.Parameters.AddWithValue("@callRedirectDate",  dataGridView2.Rows[i].Cells[0].Value);
      cmd.Parameters.AddWithValue("@callRedirectTime", dataGridView2.Rows[i].Cells[1].Value);
      cmd.Parameters.Add("@ISFsectionId", SqlDbType.DateTime).Value = dataGridView2.Rows[i].Cells["Column11"].Tag;
      cmd.Connection = cnn;
      cmd.ExecuteNonQuery();
  
      }
  </code></pre>