Re: Adding a stored number of minutes to a stored time - Mailing list pgsql-novice

From Michael Glaesemann
Subject Re: Adding a stored number of minutes to a stored time
Date
Msg-id 5123E213-3FBA-40C4-AD11-1E558975AD73@seespotcode.net
Whole thread Raw
In response to Adding a stored number of minutes to a stored time  ("Rob Richardson" <Rob.Richardson@rad-con.com>)
Responses Re: Adding a stored number of minutes to a stored time  ("Rob Richardson" <Rob.Richardson@rad-con.com>)
List pgsql-novice
On Mar 28, 2011, at 9:06, Rob Richardson wrote:

> Greetings!
>
>
>
> All of the examples I can find for adding a number of minutes to a
> timestamp show the number of minutes being hard-coded in the query.  I
> have a table that has a column containing a starting time and another
> column containing the number of minutes until the process will be
> finished.  I want to add the starting time and the number of minutes to
> calculate the finish time.  How do I convert the minutes column from an
> int4 to an interval?  Or is there a different way I should do that?

select some_timestamp_value + int4_col * interval '1 minute'

Michael Glaesemann
grzm seespotcode net




pgsql-novice by date:

Previous
From: "Rob Richardson"
Date:
Subject: Adding a stored number of minutes to a stored time
Next
From: "Rob Richardson"
Date:
Subject: Re: Adding a stored number of minutes to a stored time