Mysql: Find entries from specific day using timestamp column

mysql, timestamp

Solution

You need to extract just the date part, using DATE() function:

SELECT *
FROM yourtable
WHERE DATE(your_column) = '2013-07-03'

or you can use this, that can make use of an index:

SELECT *
FROM yourtable
WHERE your_column >= '2013-07-03' AND
      your_column < '2013-07-03' + INTERVAL 1 DAY

Problem

My each row have time-stamp column (called 'timestamp'). How can I find all rows from specific day? I've tried calculating start/end of the day, but i'm looking for a better way.

Original source