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

From: Kevin Brannen <kevinb(at)nurseamerica(dot)net>
To: pgsql-sql(at)postgresql(dot)org
Subject: Re: is there a way to get hh:mm:ss given seconds
Date: 2002-07-09 19:11:21
Message-ID: 3D2B3559.90906@nurseamerica.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message Jie Liang 2002-07-09 19:44:55 pg_restore cannot restore index
Previous Message Jeff Eckermann 2002-07-09 19:02:08 Re: PLPGSQL language documentation