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

From: Ray O'Donnell <ray(at)rodonnell(dot)ie>
To: David Gauthier <davegauthierpg(at)gmail(dot)com>, Postgres General <pgsql-general(at)postgresql(dot)org>
Subject: Re: format return of "age" to hh:mm
Date: 2020-03-05 16:07:57
Message-ID: cafcf50d-e796-3a57-53e8-f1d965368b89@rodonnell.ie
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(at)rodonnell(dot)ie

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Andrei Zhidenkov 2020-03-05 16:12:16 Re: format return of "age" to hh:mm
Previous Message Adrian Klaver 2020-03-05 15:59:46 Re: pg_dump and public schema