How to reformat output of "age()" function

From: David Gauthier <davegauthierpg(at)gmail(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: How to reformat output of "age()" function
Date: 2019-09-11 15:38:44
Message-ID: CAMBRECCvHC-mzw5F0H20-gB54D0hnMjZud=8X86Y7v61a54ujQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

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

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Ron 2019-09-11 15:46:05 Re: How to reformat output of "age()" function
Previous Message Tom Lane 2019-09-11 13:59:48 Re: Running a Simple Update Statement Fails, Second Time Suceeds.