MySQL DATE_FORMAT: Grouping Date & Time value fields into single days made easy
To conform a datetime field to just a date in your results and make it easy to group TIMESTAMP fields in the format "2015-12-25 12:23:23" so you can group any datetime value into actual days for daily reports, use "DATE_FORMAT" below:
In other words, if you have values from a SELECT statement that are…
1 2 | DATE_FORMAT(datetime_field, '%Y-%m-%d') |