Reputation: 4211
I am using MySQL and PHP, and I want to find the difference between two dates.
I have a table named advertisers
, which has a field web_start_date
. I want to select all entries where the web_start_date
is less than 30 days from the current date
Upvotes: 3
Views: 11139
Reputation: 1751
hmmm.. try this, see if it work for you :)
SELECT * FROM advertisers WHERE DATE(web_start_date) > DATE_SUB(NOW(), INTERVAL 30 DAY)
Upvotes: -3