Often it is useful (eg for statistics) to query all records of the current day.
This is very easy with MySQL, because MySQL provides the function curdate () which gives us the current date WITHOUT time. So how do you just need to query if the record was created later than curdate().
Code example:
1 2 3 |
SELECT * from tableName WHERE timeStampDate > curdate(); |