title: saving date time picker date in sql server
body: <p>how do I insert a datetimepicker date into sql server from vb.net.</p>
  
  <p>Example of my code , just a piece, where birthdate is the datetimepicker control</p>
  
  <p>this is my code for</p>
  
  <pre><code>            cmd1.Parameters.AddWithValue("@Birthdate", birthdate.Value)
  </code></pre>
  
  <p>and here is the insert into command:</p>
  
  <pre><code>("Insert into [BD_maest].[dbo].[cust] ([Birthdate]) values ('" + birthdate.value + "')", conec)
  </code></pre>
  
  <p>I'm getting this error when trying to save data:
  <strong>conversion failed when converting date and/or time from character string</strong></p>
  
  <p>Thanks in advance</p>