Received: from dilbert.nurseamerica.net (unknown [207.53.237.114]) by postgresql.org (Postfix) with ESMTP id BD37B475982 for ; Tue, 9 Jul 2002 15:11:22 -0400 (EDT) Received: from nurseamerica.net (archimedes.myrdin.net [206.176.158.41]) by dilbert.nurseamerica.net (8.11.6/8.11.6) with ESMTP id g69JBNj12946 for ; Tue, 9 Jul 2002 14:11:23 -0500 Message-ID: <3D2B3559.90906@nurseamerica.net> Date: Tue, 09 Jul 2002 14:11:21 -0500 From: Kevin Brannen User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.0.0) Gecko/20020529 X-Accept-Language: en-us, en MIME-Version: 1.0 To: pgsql-sql@postgresql.org Subject: Re: is there a way to get hh:mm:ss given seconds References: <20020709234014.Y68009-100000@glass.pun-pun.prv> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Archive-Number: 200207/122 X-Sequence-Number: 8501 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