title: WPF c# datepicker yyyy/mm/dd without hh/mm/ss?
body: <p>I'am saving date in database from Date Picker.</p>
  
  <pre><code>uj["datum"] = dpDatum.SelectedDate;
  </code></pre>
  
  <p>[<a href="http://i59.tinypic.com/211ujk3.png][1]" rel="nofollow">http://i59.tinypic.com/211ujk3.png][1]</a></p>
  
  <pre><code> SqlDataAdapter da = new SqlDataAdapter("select h.neve, f.neve,datum, tol,ig from foglalas f,helyszin h where f.helyszin_id=h.ID and f.helyszin_id=" +
                   (cbSzur.SelectedIndex + 1) + " and f.datum&gt; @search ", c1);
                  da.SelectCommand.Parameters.AddWithValue("@search", dpSzur.SelectedDate);
  </code></pre>
  
  <p>and when i want to get back the date i get this format  <code>dd/mm/yy hh/mm/ss AM</code>
  BUT i want only this format <code>dd/mm/yy</code></p>
  
  <p>How can i resolve this probleme?</p>
  
  <p>add to data grid</p>
  
  <pre><code>SqlDataAdapter da = new SqlDataAdapter("select h.neve as Helyiség, f.neve as Fellépő,datum, tol,ig from foglalas f,helyszin h where f.helyszin_id=h.ID and f.helyszin_id=" +
                   (cbSzur.SelectedIndex + 1) + " and f.datum&gt; @search ", c1);
                  da.SelectCommand.Parameters.AddWithValue("@search", ((DateTime)dpSzur.SelectedDate).ToString("yyyy-MM-dd"));
                  DataSet ds = new DataSet();
                  da.Fill(ds, "lista");
                  dLista.ItemsSource = ds.Tables["lista"].DefaultView;
  </code></pre>