missing "day(s)" in interval (was: Convert from Seconds-Since-Epoch to Timestamp)

From: Louis-David Mitterrand <cunctator(at)apartia(dot)ch>
To: pgsql-sql(at)postgresql(dot)org
Subject: missing "day(s)" in interval (was: Convert from Seconds-Since-Epoch to Timestamp)
Date: 2000-09-23 15:45:20
Message-ID: 20000923174520.A10680@styx
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

On Thu, Sep 21, 2000 at 01:25:05PM -0700, Jie Liang wrote:
> Hi, there,
>
> urldb=# create table foo(sec int4);
> CREATE
> urldb=# insert into foo values(54321);
> INSERT 382942319 1
> urldb=# select interval(reltime (sec||'secs')) from foo;
> interval
> ----------
> 15:05:21
> (1 row)

By the way, is it normal that the "day" word doesn't appear in the interval?

auction=# select interval(now()::abstime::int4);
interval
----------------------------
30 years 9 mons 3 15:42:09
(1 row)

--
Louis-David Mitterrand - ldm(at)apartia(dot)org - http://www.apartia.org

"Perl Guy and Executive Glue Sniffer"
(stolen from Aaron Sherman's .sig)

In response to

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Tom Lane 2000-09-23 16:20:07 Re: [SQL] how to store a query, that results in a table
Previous Message Paul Wehr 2000-09-23 14:08:35 Re: [SQL] how to store a query, that results in a table