pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: David Stanaway <david@stanaway.net>
To: narendraa@subexgroup.com
Cc: pgsql-sql@postgresql.org
Subject: Re: is there a way to get hh:mm:ss given seconds
Date: 09 Jul 2002 09:58:17 -0500
Message-ID: <1026226697.29753.22.camel@ciderbox> (raw)
In-Reply-To: <001f01c2268b$c81ae2b0$19ba10ac@narendraa>
References: <001f01c2268b$c81ae2b0$19ba10ac@narendraa>

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

Attachments:

  signature.asc (application/pgp-signature, 480B) download

view thread (6+ messages)  latest in thread

Message-ID: <1026226697.29753.22.camel@ciderbox>
Permalink:  ../1026226697.29753.22.camel@ciderbox/
Also on:    postgresql.org/message-id/1026226697.29753.22.camel@ciderbox

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: david@stanaway.net, narendraa@subexgroup.com
  Subject: Re: is there a way to get hh:mm:ss given seconds
  In-Reply-To: <1026226697.29753.22.camel@ciderbox>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox