This seems rather simple but it has been giving me a headache. I have a column in my events table that is called 'date_time' and it's type is datetime.
I need to write a query that will get events by day.
Example of table
============================
| id | date_time |
============================
| 5 | 2009-03-27 14:16:00 |
============================
Now I need to get the event with the Id = 5, except I only have a date (unix timestamp) to work with. I have tried many things such as converting to mysql format and selecting between 2009-03-27 00:00:00 and 2009-03-28 00:00:00 but I couldn't get it to work.
What is the best way to do this?
Thanks muchly.