title: Convert "m/d/y" date from a form text input field to a mysql datetime "friendly" input?
body: <p>So I have a problem. Trying to convert input from form text input field which is in the following format: 08/06/2013 to a value that can be inserted into mysql datetime column.</p>
  
  <p>I have tried this</p>
  
  <pre><code>$startdate_timestamp = strtotime($this-&gt;startdate); 
  // $this-&gt;startdate is the value from the input field
  $this-&gt;startdate = date("YYYY-MM-DD HH:MM:SS",$startdate_timestamp);
  </code></pre>
  
  <p>But it seems that it is not doing anything. Is there any other way than this that would work ? I am using Yii framework so that is why code looks weird :)</p>