Forum OpenACS Q&A: Response to month info query & date arithmetic

Collapse
Posted by Don Baccus on
All sorts of mini-issues here ...

As Peter noted you can just write

"now() + 7".

  If you do that, though, PG will return a date (no time info) not a timestamp.  Which happens to be what you want in this case.  However ... the PG group is busy tossing old date semantics overboard in favor of an approach more congruent with the standard.  So the above construct may not work in PG 7.3 or later versions.

To maximize your chances of not having to change your code in the future I'd suggest the following construct:

date (current_timestamp + interval '7 days')