Reporter - Display records with dates more than 1 year in the past

I am reporting on a module that has a date field indicating the last medical exam received .

How do I prefilter the table so that the records displayed have - 1 year? I can’t seem to get the syntax right.

Should be DateTime <= DATE_SUB(NOW(), INTERVAL 1 YEAR)

The filters syntax is SQL-like. That means it should support what SQL does.

jfortun suggestion seems it should work, but if not, here’s a variation:

Assuming your date field is called `LastMedicalExam

LastMedicalExam <= NOW() - 365*DAY

NOW() gives the current date.
365*DAY represents 365 days. You can replace 365 with other values to change the timeframe if needed. Alternatively, you can use a relative date syntax as previously suggested.

1 Like