now() - interval(:the_interval)
where the_interval is '1 days' or similar.
Of course, then you have to change the code somewhat, too.