Building date from GMT date
<blockquote>
  <p><strong>Possible Duplicate:</strong><br>
  <a href="http://stackoverflow.com/questions/5454779/how-to-convert-php-date-formats-to-gmt-and-vice-versa">how to convert php date formats to GMT and vice versa?</a>  </p>
</blockquote>



<p>I get a string such as this:</p>

<blockquote>
  <p>May 21, 2012 07:23:15 GMT</p>
</blockquote>

<p>I need to convert it into something like this: 21-05-2012.</p>

<p>Note that I might get a date such as this too:</p>

<blockquote>
  <p>21 May 2012 07:23:15 GMT</p>
</blockquote>

<p>How can I achieve that conversion?</p>
