title: php extract year/month/day/hour/minute/seconds from a date
body: <p>if i have a date and i want to extract the year, the month, etc in PHP5, how should i proceed?</p>
  
  <p>if i do</p>
  
  <pre><code> $y = date('Y',$sale-&gt;end);  
  </code></pre>
  
  <p>it doesn't work...</p>