I need to convert mysql datetime to php Y-m-d
. Essentially I just need to drop the hh:mm:ss from the datetime. How can I do this?
Furthermore, once I have the PHP dates in the format Y-m-d
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 < 1-1-14)?