Help with a query and date ranges

We’re trying to write an SQL (MySQL) query that finds “late” forms submitted.

The table has two key date fields, date_hired and date_submitted. Forms are considered “late” when the forms are submitted more than 28 days after the date they were hired.

I’ve searched a good bit and can’t seem to find one query that will find all the records matching the above criteria.

Anyone know of a way to write it? Any help would be much appreciated.

make sure you write INTERVAL 28 DAY

(DAY, not DAYS)


FROM tablename
WHERE date_submitted > date_hired + INTERVAL 28 DAYS

Looked in the wrong column. Still, DAYS would be more logical :nono:

Wow, thanks… I’ll give that a try!