Currently, I am doing mySQL queries as such selecting a unix time stamp from a database, like so:
SELECT DATE(FROM_UNIXTIME(time)) AS theday, COUNT(id) AS thecount FROM `table`
WHERE `time`>=UNIX_TIMESTAMP(CURRENT_DATE - > INTERVAL 14 DAY)
GROUP BY theday
ORDER by theday DESC
How would I go about doing a similar query but selecting a DATETIME format? Instead of a unix time stamp?
For example,
0000-00-00 00:00:00
I think MySql DATE_FORMAT will work for you.