Re: BUG #1107: Missing feature: interval <-> numeric quantity - Mailing list pgsql-bugs

From Stephan Szabo
Subject Re: BUG #1107: Missing feature: interval <-> numeric quantity
Date
Msg-id 20040318064620.J47930@megazone.bigpanda.com
Whole thread Raw
In response to BUG #1107: Missing feature: interval <-> numeric quantity conversion  ("PostgreSQL Bugs List" <pgsql-bugs@postgresql.org>)
List pgsql-bugs
On Thu, 18 Mar 2004, PostgreSQL Bugs List wrote:

> Having two timestamps it is common need to know how many
> seconds/minutes/hours/days/etc. passed from one to the other. However there
> is no easy way to do this task.
>
> The basic idea is subtracting the two timestamps. However it gives a data
> type called "interval". The thing I would like to have is a function that
> takes the "interval" and outputs it's length. Currently when I want a

date_part('epoch', intervalval)
 or
EXTRACT(EPOCH FROM intervalval)
 gives the number of seconds in the interval as per the documentation of
these functions in the date/time functions and operators section of the
documentation.

pgsql-bugs by date:

Previous
From: Joe Sunday
Date:
Subject: Re: BUG #1107: Missing feature: interval <-> numeric quantity conversion
Next
From: Bruce Momjian
Date:
Subject: Re: BUG #1107: Missing feature: interval <-> numeric quantity