Re: format return of "age" to hh:mm

Поиск
Список
Период
Сортировка
От Andrei Zhidenkov
Тема Re: format return of "age" to hh:mm
Дата
Msg-id B8FA4081-EB2C-4017-B36B-3B2B6F326CDC@n26.com
обсуждение исходный текст
Ответ на Re: format return of "age" to hh:mm  (Ray O'Donnell <ray@rodonnell.ie>)
Список pgsql-general
However, you cannot use to_char() to display the count of days for a given interval. In this case, if your interval is
largerthan 24 hours, you might use extract(epoch from <interval>) and perform the conversion manually. 

> On 5. Mar 2020, at 17:07, Ray O'Donnell <ray@rodonnell.ie> wrote:
>
> On 05/03/2020 15:50, David Gauthier wrote:
>> Hi:
>>
>> How does one reformat the output of the "age" function to always be in
>> terms of hours:mins.
>
> Hi there,
>
> age() returns an interval, so without having tried it I'm guessing you
> could use to_char() to format it whatever way you want.
>
> Ray.
>
> --
> Raymond O'Donnell // Galway // Ireland
> ray@rodonnell.ie
>
>




В списке pgsql-general по дате отправления:

Предыдущее
От: Ray O'Donnell
Дата:
Сообщение: Re: format return of "age" to hh:mm
Следующее
От: "David G. Johnston"
Дата:
Сообщение: Re: format return of "age" to hh:mm