title: String value to be inserted in a date datatype mysql
body: <p>I want to insert current date into a database in the field <code>cur_dt</code> having datatype date.</p>
  
  <pre><code> string curr_dat= DateTime.Now.ToString("yyyy-mm-dd");
  </code></pre>
  
  <p>Can i insert <code>curr_dat</code> which is a string variable into a column <code>cur_dt</code> having datatype as date?</p>
  
  <p>If not than how can i do it? How to define a date variable.I want to also insert current time in the a column <code>cur_tm</code> having datatype time.</p>
  
  <p>Please help me to understand how to insert the date and time into the database.</p>