In MySQL, let's say I have a table with a column called 'actionTime' declared as a 'datetime' (YYYY-MM-DD HH:MM:SS).
Is there an easy way to use "GROUP BY actionTime" but only use the 'date' part of the 'datetime'?
Thanks
In MySQL, let's say I have a table with a column called 'actionTime' declared as a 'datetime' (YYYY-MM-DD HH:MM:SS).
Is there an easy way to use "GROUP BY actionTime" but only use the 'date' part of the 'datetime'?
Thanks
Ahh Google .. so easy to use.
http://dev.mysql.com/doc/refman/5.1/en/date-and-time-functions.html#function_date
mysql> SELECT DATE('2003-12-31 01:02:03');
-> '2003-12-31'