From: Kevin Brannen <kevinb@nurseamerica.net>
To: pgsql-sql@postgresql.org
Subject: Re: is there a way to get hh:mm:ss given seconds
Date: Tue, 09 Jul 2002 14:11:21 -0500
Message-ID: <3D2B3559.90906@nurseamerica.net> (raw)
References: <20020709234014.Y68009-100000@glass.pun-pun.prv>
Tod McQuillin wrote:
> On Mon, 8 Jul 2002, Narendra A wrote:
>
>
>>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
>
>
> foo=# select '422 seconds'::interval;
> interval
> ----------
> 00:07:02
> (1 row)
That works on inserts into a "time" field too, cool tip. THANKS!
Kevin
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: kevinb@nurseamerica.net
Subject: Re: is there a way to get hh:mm:ss given seconds
In-Reply-To: <3D2B3559.90906@nurseamerica.net>
* 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