pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Ron <ronljohnsonjr@gmail.com>
To: pgsql-general@lists.postgresql.org
Subject: Re: How to reformat output of "age()" function
Date: Wed, 11 Sep 2019 10:46:05 -0500
Message-ID: <c3b75ea3-58d5-4637-6023-d258a7c12e54@gmail.com> (raw)
In-Reply-To: <CAMBRECCvHC-mzw5F0H20-gB54D0hnMjZud=8X86Y7v61a54ujQ@mail.gmail.com>
References: <CAMBRECCvHC-mzw5F0H20-gB54D0hnMjZud=8X86Y7v61a54ujQ@mail.gmail.com>

On 9/11/19 10:38 AM, David Gauthier 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.

This SO answer might help: https://stackoverflow.com/a/24930139/1543618

-- 
Angular momentum makes the world go 'round.

view thread (10+ messages)  latest in thread

Message-ID: <c3b75ea3-58d5-4637-6023-d258a7c12e54@gmail.com>
Permalink:  ../c3b75ea3-58d5-4637-6023-d258a7c12e54@gmail.com/
Also on:    postgresql.org/message-id/c3b75ea3-58d5-4637-6023-d258a7c12e54@gmail.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-general@postgresql.org
  Cc: ronljohnsonjr@gmail.com
  Subject: Re: How to reformat output of "age()" function
  In-Reply-To: <c3b75ea3-58d5-4637-6023-d258a7c12e54@gmail.com>
  References: <CAMBRECCvHC-mzw5F0H20-gB54D0hnMjZud=8X86Y7v61a54ujQ@mail.gmail.com> <c3b75ea3-58d5-4637-6023-d258a7c12e54@gmail.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox