Search Postgresql Archives

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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



However, you cannot use to_char() to display the count of days for a given interval. In this case, if your interval is larger than 24 hours, you might use extract(epoch from <interval>) and perform the conversion manually.

> On 5. Mar 2020, at 17:07, Ray O'Donnell <ray@xxxxxxxxxxxx> wrote:
> 
> 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@xxxxxxxxxxxx
> 
> 







[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]

  Powered by Linux