Re: Date Math

From: Jean-Luc Lachance <jllachan(at)nsd(dot)ca>
To: John Goetsch <jg(at)seacode(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Date Math
Date: 2003-07-09 18:48:18
Message-ID: 3F0C6372.933B8EC9@nsd.ca
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
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(at)postgresql(dot)org

In response to

  • Date Math at 2003-07-09 18:39:22 from John Goetsch

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Jan Wieck 2003-07-09 19:11:12 Re: ERROR: Relation "pg_user" does not exist
Previous Message John Goetsch 2003-07-09 18:39:22 Date Math