title: How to convert MySQL DateTime to PHP Y-m-d?
body: <p>I need to convert mysql datetime to php <code>Y-m-d</code>. Essentially I just need to drop the hh:mm:ss from the datetime. How can I do this?</p>
  
  <p>Furthermore, once I have the PHP dates in the format <code>Y-m-d</code> how can I do a comparison of two dates to tell which is higher? For example if I have 12-31-13 and 1-1-14 can I just do if (12-31-13 &lt; 1-1-14)?</p>