I'm trying to substract n days from the current date. I'd like to use this in my query to filter results older than NOW()-n days.
The column in the database is of type timestamp. I guess it's best to do this i the query but I haven't found any working solution yet...
All the other threads are using java.util.date as type.
You could use the built-in DATERANGE() function in an expression like this:
where n is the number of days to be substracted.
To make this work, you need to place the jasperreports-functions.jar in your app classpath.