Re: interval output format ?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: David Pirotte <david(at)altosw(dot)be>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: interval output format ?
Date: 2001-03-18 17:21:25
Message-ID: 20031.984936085@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

David Pirotte <david(at)altosw(dot)be> writes:
> how can I ask postgres to return
> 43:18
> instead of
> @ 1 day 19 hours 18 mins

I think right now the only way is to convert the interval value to
seconds (date_part('epoch', interval)) and then format it yourself.
to_char() ought to have support for formatting intervals, but seems
not to at the moment.

regards, tom lane

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Patrick Welche 2001-03-18 19:07:34 Re: simple question: building psql
Previous Message David Pirotte 2001-03-18 16:41:28 interval output format ?