Re: time interval format srting

From: "Scott Marlowe" <scott(dot)marlowe(at)gmail(dot)com>
To: "Joao Ferreira gmail" <joao(dot)miguel(dot)c(dot)ferreira(at)gmail(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: time interval format srting
Date: 2008-11-04 17:53:07
Message-ID: dcc563d10811040953u2cef153fq843fa8db2fa8d7b5@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Tue, Nov 4, 2008 at 10:06 AM, Joao Ferreira gmail
<joao(dot)miguel(dot)c(dot)ferreira(at)gmail(dot)com> wrote:
> 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)

select number*interval '1 sec';

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Steve Atkins 2008-11-04 17:59:46 Re: Semi-customized queries? Subset of SQL? Accessing the parser? Injection?
Previous Message Jason Long 2008-11-04 17:23:06 Re: JDBC and setting statement_timeout