Re: is there a way to get hh:mm:ss given seconds

From: David Stanaway <david(at)stanaway(dot)net>
To: narendraa(at)subexgroup(dot)com
Cc: pgsql-sql(at)postgresql(dot)org
Subject: Re: is there a way to get hh:mm:ss given seconds
Date: 2002-07-09 14:58:17
Message-ID: 1026226697.29753.22.camel@ciderbox
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(at)ciderbox:~$ bc -l
7*60+2
422

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

--
David Stanaway

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message Bradley Kieser 2002-07-09 17:10:57 Re: PLPGSQL language documentation
Previous Message Tod McQuillin 2002-07-09 14:41:23 Re: is there a way to get hh:mm:ss given seconds