title: How to convert this date to Y-m-d (PHP)?
body: <p>I have this date as a string: 10.21.2011, the format is mm.dd.yyyy</p>
  
  <p>How can I convert this to Y-m-d? This is what I tried, but it always gives me the 1970 date.</p>
  
  <pre><code>$date = date('Y-m-d', strtotime($date));
  </code></pre>
  
  <p>Thanks!</p>