Re: Date Math

Jean-Luc Lachance <jllachan@nsd.ca>

From: Jean-Luc Lachance <jllachan@nsd.ca>
To: John Goetsch <jg@seacode.com>
Cc: pgsql-general@postgresql.org
Date: 2003-07-09T18:48:18Z
Lists: pgsql-general
Try:

update foo set  timestamp_field  = timestamp_field + '365
days'::interval;


John Goetsch wrote:
> 
> Hi,
> 
> I am trying to modify some timestamps in the database and cannot find
> documentation relating to date/timestamp manipulation.
> 
> What I am thinking of something like:
> 
> update foo set  timestamp_field  = timestamp_field + 365;
> 
> where the 365 is days, or seconds or something.
> 
> Any hints?
> 
> Thanks
> john
> 
> ---------------------------(end of broadcast)---------------------------
> TIP 1: subscribe and unsubscribe commands go to majordomo@postgresql.org