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:

https://stackoverflow.com/questions/3460805/postgresql-format-interval-as-minutes

bobb



On Sep 11, 2019, at 10:38 AM, David Gauthier 
<davegauthie...@gmail.com<mailto:davegauthie...@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

Reply via email to