title: In C# winforms - How do you search database by date time picker?
body: <p>I have been stuck on this for two days.  I simply want to search my table by date.  I am displaying in dataGridView.  If I select button dataGridView shows all data in table.  If I select date then press button I get the following message from the catch messagebox: </p>
  
  <pre><code>Conversion failed when converting data and/or time from character string. 
  </code></pre>
  
  <p>Table name: FlightDetails
  Column : DateDepart (date)</p>
  
  <pre><code>    string ConString = ConfigurationManager.ConnectionStrings["ConnectionString"].ConnectionString;
      SqlConnection myDB = new SqlConnection(ConString);
      SqlCommand com = new SqlCommand("SELECT * FROM FlightDetails WHERE DateDepart ='" + datDepartDate + "%'", myDB);
  
      try
      {
      SqlDataAdapter sda = new SqlDataAdapter();
      sda.SelectCommand = com;
      DataTable dsDB = new DataTable();
      sda.Fill(dsDB);
      BindingSource bs = new BindingSource();
  
      bs.DataSource = dsDB;
      dataGridView1.DataSource = bs;
      sda.Update(dsDB);
      dataGridView1.Visible = true;
  
  }
  catch (Exception ex)
  {
      MessageBox.Show(ex.Message);
  }
  </code></pre>
  
  <p>I am using Visual Studio 2013, C# winforms.  Guidance with code would be preferred please.  I am sure all I need to do is convert date time picker but I have tried with no success.</p>