title: Insert DATE as DATE->Format() in Mysql
body: <p>I' trying to insert a DATE into MySQL database. Date has been set as new DateTime() and formatted to "Y:m:d". A variable carries the new DateTime but when inserting it to a DATE field in MYSQL only ceros are inserted. The DATE field is not getting NULL results but just CEROS 000-00-00.
  This is my code.</p>
  
  <pre><code>    $bigin=date("Y-m-d");
      $datetime_bigining = new DateTime($bigin);
      $datetime_bigining-&gt;modify('-60 day');
      $datetime_bigining-&gt;format('Y:m:d');
  
      $insert_days= mysql_query("INSERT INTO $tocreate (date_full)  VALUES".$datetime_bigining-&gt;format('Y-m-d').");") or die(mysql_error());
  </code></pre>