converting date format using javascript
<p>I have a simple textfield with the type defied to be as date which attached with a jquery <code>datepicker()</code>. Now i have set the <code>dateFormat()</code> to be <code>dd-mm-yy</code>. All this works fine. But as i know MySql requires date in <code>yyyy-mm-dd</code>. So i was just wondering if i can convert that date format either using php or javascript to enter into the database. </p>

<p>E.g <code>var date = $('#order_date').val();</code> gives value 26-2-2012. I need to convert this into 2012-02-26.</p>

<p><strong>Note:</strong> There is also a <code>0</code> being added to the month.</p>
