How to format date
<p>I have a date as "Thursday, 4 Aug 2011".  How do I format it to "yyyy/MM/dd"?  I have tried the codes: </p>

<pre><code>var myDate =   dateText.toString("yyyy/MM/dd");
myDate = Date.parseExact(myDate, "yyyy/MM/dd")
</code></pre>

<p>but none seem to work.  Help please.   </p>
