Skip site navigation (1) Skip section navigation (2)

Adding variable intervals to timestamps

From: "Walker, Jed S" <Jed_Walker(at)cable(dot)comcast(dot)com>
To: <pgsql-novice(at)postgresql(dot)org>
Subject: Adding variable intervals to timestamps
Date: 2005-08-15 20:27:04
Message-ID: F7638DABBEBB4A4CB70616DE2B19E6B80672E3@COENGEXCMB01.cable.comcast.com (view raw or flat)
Thread:
Lists: pgsql-novice
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.


-Jed


Responses

pgsql-novice by date

Next:From: Bruno Wolff IIIDate: 2005-08-15 20:44:08
Subject: Re: Adding variable intervals to timestamps
Previous:From: Tom LaneDate: 2005-08-15 19:58:05
Subject: Re: "external" variables and triggers

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group