Re: How to reformat output of "age()" function

Поиск
Список
Период
Сортировка
От Basques, Bob (CI-StPaul)
Тема Re: How to reformat output of "age()" function
Дата
Msg-id 1402ED33-C80E-43E0-AB2A-D29326CAD3A7@ci.stpaul.mn.us
обсуждение исходный текст
Ответ на How to reformat output of "age()" function  (David Gauthier <davegauthierpg@gmail.com>)
Список pgsql-general
SELECT EXTRACT(EPOCH FROM age('2019-09-11 09:00:00','2019-09-09 11:00:00')::INTERVAL)/60;

A nice explanation and even a slick function are here:


bobb



On Sep 11, 2019, at 10:38 AM, David Gauthier <davegauthierpg@gmail.com> wrote:



How can I change the default output of the "age" function to be, for example, in minutes?

E.g.
dvdb=> select age('2019-09-11 09:00:00','2019-09-09 11:00:00');
      age      
----------------
 1 day 22:00:00
(1 row)

I want the equivalent of that time delta in minutes.

Thanks in Advance 

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

Предыдущее
От: Ron
Дата:
Сообщение: Re: How to reformat output of "age()" function
Следующее
От: Francisco Olarte
Дата:
Сообщение: Re: How to reformat output of "age()" function