Here is an example that uses date functions. The following query selects all rows with a date_col value from within the last 30 days:

SELECT something FROM tbl_name WHERE DATE_SUB(CURDATE(),INTERVAL 30 DAY) <= date_col;

The query also selects rows with dates that lie in the future.

And try also that

SELECT   * FROM tbl_name   WHERE  date_col  > ‘2013/07/03’ order by date_col   limit 100

 

Leave a Reply

Your email address will not be published. Required fields are marked *