Josh Berkus writes:
> 1. The difference between two TIMESTAMPs is always an INTERVAL
> '1999-12-30'::TIMESTAMP - '1999-12-11'::TIMESTAMP = '19 days'::INTERVAL
> 2. You may add or subtract an INTERVAL to a TIMESTAMP to produce another
> TIMESTAMP:
> '1999-12-11'::TIMESTAMP + '19 days'::INTERVAL = '1999-12-30'::TIMESTAMP
> 3. You may add or subtract two INTERVALS:
> '1 month'::INTERVAL + '1 month 3 days'::INTERVAL = '2 months 3 days'
> INTERVAL
You should probably use the correct literal syntax here, e.g., TIMESTAMP
'1999-12-30' and INTERVAL '3 days'.
--
Peter Eisentraut peter_e@gmx.net http://funkturm.homeip.net/~peter