title: Convert date string into date format
body: <blockquote>
    <p><strong>Possible Duplicate:</strong><br>
    <a href="https://stackoverflow.com/questions/1929339/php-function-to-get-the-date-format">PHP function to get the date format?</a>  </p>
  </blockquote>
  
  
  
  <p>For example:</p>
  
  <pre><code>$date = date_parse('2010-09-17 14:00:00');
  </code></pre>
  
  <p>gets me:</p>
  
  <pre><code>year    =&gt;  2010
  month   =&gt;  9
  day     =&gt;  17
  hour    =&gt;  14
  minute  =&gt;  0
  second  =&gt;  0
  </code></pre>
  
  <p>which according to how PHP interpreted the string, corresponds to this format:</p>
  
  <p><code>Y-m-d H:i:s</code></p>
  
  <p>Given any date string, how can I get the format string, as understood by date_parse / strtotime ?</p>