title: How to convert simple date from textbox to datetime in mysql?
body: <p>I have a date in textBox like 2014-17-04 i.e.(YYYY-DD-MM) I wnt to put it in the database such as 2014-04-17 00:00:00 ,So How can I do this. I have tried like following..</p>
  
  <pre><code>sSQL = "INSERT INTO Date_Master(BirthDate) VALUES('"+Convert.ToDateTime(txtBirthdate.Text)+"')";
  </code></pre>
  
  <p>but it gives error that "String was not recognized as a valid DateTime" . So how can I insert values in the database using MySQL DATE_FORMAT?</p>