Monday 5 February 2018

Get all results from that day of Datetime

Use >= and < so it will preserve the index if you have.
WHERE timestamp >= DATE(:timestamp) 
      AND timestamp < DATE(:timestamp) + INTERVAL 1 DAY
DATE() will strip the time.

No comments:

Post a Comment