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

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 (view raw or flat)
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

pgsql-sql by date

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

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