Re: format return of "age" to hh:mm - Mailing list pgsql-general

From Ray O'Donnell
Subject Re: format return of "age" to hh:mm
Date
Msg-id cafcf50d-e796-3a57-53e8-f1d965368b89@rodonnell.ie
Whole thread Raw
In response to format return of "age" to hh:mm  (David Gauthier <davegauthierpg@gmail.com>)
Responses Re: format return of "age" to hh:mm  (Andrei Zhidenkov <andrei.zhidenkov@n26.com>)
List pgsql-general
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 by date:

Previous
From: Adrian Klaver
Date:
Subject: Re: pg_dump and public schema
Next
From: Andrei Zhidenkov
Date:
Subject: Re: format return of "age" to hh:mm