title: passing string as datetime parameter in sql command
body: <p>I have dropdown combobox bound to a date field.</p>
  
  <p>Now I want to pass the selected value in the combobox into a SQL query by using <code>SqlCommand</code></p>
  
  <p>I want to pass parameters &amp; add with value in datetime.</p>
  
  <p>I tried this code:</p>
  
  <pre><code>cmd.Parameters.AddWithValue("@Expiry", cmbox.SelectedValue.ToString()); and also try
  cmd.Parameters.AddWithValue("@Expiry", cmbExpiryDate.SelectedValue.ToString("MM-dd-yyyy"));
  </code></pre>
  
  <p>but no use it throw conversion overflow. I am beginner plz help me it is window form 
  I am using 2005 studio </p>
  
  <p>Value from combobox:
  <code>28-04-2014 00:00:00</code></p>
  
  <p><strong>Error</strong>
  <code>Arithmetic overflow error converting expression to data type datetime.</code></p>