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

From Kevin Brannen
Subject Re: is there a way to get hh:mm:ss given seconds
Date
Msg-id 3D2B3559.90906@nurseamerica.net
Whole thread Raw
In response to Re: is there a way to get hh:mm:ss given seconds  (Tod McQuillin <devin@spamcop.net>)
List pgsql-sql
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



pgsql-sql by date:

Previous
From: Jeff Eckermann
Date:
Subject: Re: PLPGSQL language documentation
Next
From: Jie Liang
Date:
Subject: pg_restore cannot restore index