Hi,
I'm trying to write a query that returns 2 columns, the date and the number of records that were added to the table on that date. I'm really stuck though because the date is in the form of a timestamp which also includes the time.
I thought the query would be something like:
Code:
SELECT DATE_FORMAT( rstf_created, '%e %d %Y' ) , COUNT( * )
FROM `rst_applicants`
GROUP BY DATE( `rstf_created` )
This does not work at all however, I get about 6000 records under count for a date of NULL, and about 10 records for dates in the future with 1 count each.
Can anyone give me a pointer, I'm guessing that my overall logic is off based on the results I'm getting but I also have no idea how to get MySQL to just use the date portion of the timestamp either.
Any help would be greatly appreciated.
Many thanks.