time interval format srting

From: Joao Ferreira gmail <joao(dot)miguel(dot)c(dot)ferreira(at)gmail(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: time interval format srting
Date: 2008-11-04 17:06:37
Message-ID: 1225818397.4564.29.camel@debj4n.critical.pt
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hello,

I've been searching the docs on a simple way to convert a time
_duration_ in seconds to the format dd:hh:mm:ss, but I can't find it.

90061 --> 1d 1h 1m 1s

(90061=24*3600+3600+60+1)

any ideas ?

I've been using to_char and to_timestamp to format dates/timestamps...
but this is diferent... I want to format time intervals, durations..

cheers
Joao

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Webb Sprague 2008-11-04 17:21:18 Semi-customized queries? Subset of SQL? Accessing the parser? Injection?
Previous Message David Fetter 2008-11-04 16:11:01 Re: epqa; postgres performance optimizer support tool; opensource.