Amit Dhamu

Software Engineer

Get Date If After Interval

Let's say we want to grab a table row in a MySQL database but only if the value in the date_added column is older than 3 months (ie. 3 months has passed since the date in the table row).

SELECT * FROM table WHERE (NOW() > date_added + INTERVAL 3 months)

date / interval / mysql

← Mac Recovery Tools Use Browser As Notepad →