COnvert date from Thu Jun 09 2011 00:00:00 GMT+0530 (India Standard Time) to YYYY-MM-DD in javascript
<p>How can I convert the time from the format "Thu Jun 09 2011 00:00:00 GMT+0530 (India Standard Time)" to YYYY-MM-DD.</p>

<p>When I try to alert() the date then this will show the date like the following
- Thu Jun 09 2011 00:00:00 GMT+0530 (India Standard Time)</p>

<p>But I need the time in YYYY-MM-DD format.</p>

<p>are there any built function to convert.</p>
