title: PHP Zend date format
body: <p>I want to input a timestamp in below format to the database.</p>
  
  <pre><code>yyyy-mm-dd hh:mm:ss
  </code></pre>
  
  <p><strong>How can I get in above format?</strong></p>
  
  <p>When I use </p>
  
  <pre><code>$date = new Zend_Date();
  </code></pre>
  
  <p>it returns  <strong>month dd, yyyy hh:mm:ss PM</strong></p>
  
  <p>I also use a JavaScript calender to insert a selected date and it returns in <strong>dd-mm-yyyy</strong> format</p>
  
  <p>Now, I want to convert these both format into yyyy-mm-dd hh:mm:ss so can be inserted in database. <strong>Because date format not matching the database field format the date is not inserted and only filled with *<em>00-00-00 00:00:00</em>*</strong></p>
  
  <p>Thanks for answer</p>