title: How to convert date?
body: <p>I'am using the calendar of primefaces:</p>
  
  <pre><code>&lt;p:calendar  value="#{TestAjax.date1}" showOn="button" /&gt;
  </code></pre>
  
  <p>this calandar return the date with this format:</p>
  
  <pre><code>Fri Jul 08 00:00:00 GMT+01:00 2011
  </code></pre>
  
  <p>How can I convert this date to this format : 2011-07-08 or 2011/07/08</p>
  
  <p>Thank you</p>
  
  <p><strong>UPADTE</strong></p>
  
  <p>I have converted the date ,below the code I hope this will help sombody else</p>
  
  <pre><code>DateFormat out = new SimpleDateFormat("MM/dd/yyyy");
  String date=out.format(myDate1);
  </code></pre>