Re: Adding variable intervals to timestamps

From: Bruno Wolff III <bruno(at)wolff(dot)to>
To: "Walker, Jed S" <Jed_Walker(at)cable(dot)comcast(dot)com>
Cc: pgsql-novice(at)postgresql(dot)org
Subject: Re: Adding variable intervals to timestamps
Date: 2005-08-15 20:44:08
Message-ID: 20050815204408.GA19311@wolff.to
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

On Mon, Aug 15, 2005 at 14:27:04 -0600,
"Walker, Jed S" <Jed_Walker(at)cable(dot)comcast(dot)com> wrote:
> Hi,
>
> We need to add an interval (from a row in a table) to the curren time.
> Basically,
>
> Table1 has the column offset_in_secs that is an integer.
>
> Select current_timestamp + '<offset_in_secs> seconds' from table1;
>
> But can't figure out how to do this.

Select current_timestamp + offset_in_secs * '1 seconds' from table1;

In response to

Browse pgsql-novice by date

  From Date Subject
Next Message Walker, Jed S 2005-08-15 20:51:17 Re: Adding variable intervals to timestamps
Previous Message Walker, Jed S 2005-08-15 20:27:04 Adding variable intervals to timestamps