If your dates are not stored as Unix timestamps then you can remove the "from_unixtime" function wrapping [datefield]
select [fields] from [table] where from_unixtime([datefield]) >= DATE_SUB(NOW(), INTERVAL 1 MONTH);
Helpful bits and bytes
select [fields] from [table] where from_unixtime([datefield]) >= DATE_SUB(NOW(), INTERVAL 1 MONTH);
No comments:
Post a Comment