Re: is there a way to get hh:mm:ss given seconds - Mailing list pgsql-sql

From David Stanaway
Subject Re: is there a way to get hh:mm:ss given seconds
Date
Msg-id 1026226697.29753.22.camel@ciderbox
Whole thread Raw
In response to is there a way to get hh:mm:ss given seconds  ("Narendra A" <narendraa@subexgroup.com>)
List pgsql-sql
On Mon, 2002-07-08 at 09:28, Narendra A wrote:
> Sir,
> Is there a way in sql such that if I give seconds it should me return me
> hours:mins:seconds
>
> Eg. Seconds     hh:mm:ss
> 422              1:01:02


scratch=# SELECT 422::interval;interval
----------00:07:02
(1 row)

scratch=# \q
dstanawa@ciderbox:~$ bc -l
7*60+2
422

I don't know where you got 1:01:02 from.


--
David Stanaway

pgsql-sql by date:

Previous
From: Bruno Wolff III
Date:
Subject: Re: INSERT only under certain conditions (SELECT)
Next
From: Tod McQuillin
Date:
Subject: Re: is there a way to get hh:mm:ss given seconds