Re: interval output format ? - Mailing list pgsql-general

From Tom Lane
Subject Re: interval output format ?
Date
Msg-id 20031.984936085@sss.pgh.pa.us
Whole thread Raw
In response to interval output format ?  (David Pirotte <david@altosw.be>)
List pgsql-general
David Pirotte <david@altosw.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

pgsql-general by date:

Previous
From: David Pirotte
Date:
Subject: interval output format ?
Next
From: Boris
Date:
Subject: ERROR: Bad timestamp external representation ''