Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1i84uF-0007dt-Ph for pgsql-general@arkaria.postgresql.org; Wed, 11 Sep 2019 15:51:43 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1i84uE-0005QN-M2 for pgsql-general@arkaria.postgresql.org; Wed, 11 Sep 2019 15:51:42 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1i84uE-0005G5-57 for pgsql-general@lists.postgresql.org; Wed, 11 Sep 2019 15:51:42 +0000 Received: from mail-oi1-x234.google.com ([2607:f8b0:4864:20::234]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1i84uB-00024D-Bq for pgsql-general@lists.postgresql.org; Wed, 11 Sep 2019 15:51:41 +0000 Received: by mail-oi1-x234.google.com with SMTP id z6so9005112oix.9 for ; Wed, 11 Sep 2019 08:51:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:references:from:message-id:date:user-agent:mime-version :in-reply-to:content-language; bh=kBmS6nrAXo1OFcBIbhvd5x5Brb/Qf11Jtl/jh5mflSY=; b=YT4sdFyBd08YPZB3H7ZBSUIVoPCWewDWy8JOrjkA7/TjqtwBI2omVhihi+1U+vOMfP 4rYuBwocrK0Nw5Tlx8S7mvnO3zkBrTxJFdj2WlOgi2wFJp36TZ+FNeSb9maGMujbS76H OUVvIziclTcc7LigDOD0qSm7ew03m8K+uPac/cN0HQgqp2iAk6g/7ONyYsbaWnvVJ5kE LwCzz8vP00TkRY3Ey/6Xc2pDwrEbZ9IsRCYiRmWJ2t9rEwmGSAMz1ZtuExTl1vGucu1A Ik6nsfGsEgu95t2hsKgrT09AlhPpQDyfyn2ZKaMepGCgy/2Gn9KIfUP+T8D9qB0cFrtW vf8w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language; bh=kBmS6nrAXo1OFcBIbhvd5x5Brb/Qf11Jtl/jh5mflSY=; b=j5fWpANjYkSnahv4EaiHVA/4MgPuah/AKJylVVTpdMuvFiCjWGu3lkOdsUwg+gr3JK TmSPzarH6mxsLO3Tp7t58nAnmotUUpR6+kcAyRM0Coe1TqV8rK5JVsLNUZcCuawWdMH6 lSd2TwmyysfXfWelPqJHPnysGYtgb82PsnL/c2wKp/Y/V2Wvg3Zyw4QzkC6k1P13WZZB pigyxvhB6GBRw55YD9ctyhJVNv+W2sM/9X2Ukxtu5BvdPRq2Vz2UBEwj5FkxIorxSSGA Lb++wrSmLPOz6VTfAuyur1+cC9135P8sZBXbk2oPeI3EmO5LDWgXnajMLmPJlL9/JBam uTRQ== X-Gm-Message-State: APjAAAV2NmMzrHI9QgDyuzeSxe3Yxp8NcEPNk5cN7a1RP6HjbNpjbRr2 R1ShWe1Pe9QN0JT9iAYjn0oxAMZJ77e5ew== X-Google-Smtp-Source: APXvYqwhoFOOQ5IBrspHKT7qd67k9VcsuRJEvT00piBYV2dTV9psj4bbmqQGLFrOfwXpo5WidCJRig== X-Received: by 2002:aca:b7c5:: with SMTP id h188mr4848857oif.125.1568216766723; Wed, 11 Sep 2019 08:46:06 -0700 (PDT) Received: from [192.168.1.10] (ip70-186-126-197.no.no.cox.net. [70.186.126.197]) by smtp.googlemail.com with ESMTPSA id m8sm6302165oih.26.2019.09.11.08.46.05 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 11 Sep 2019 08:46:06 -0700 (PDT) Subject: Re: How to reformat output of "age()" function To: pgsql-general@lists.postgresql.org References: From: Ron Message-ID: Date: Wed, 11 Sep 2019 10:46:05 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.8.0 MIME-Version: 1.0 In-Reply-To: Content-Type: multipart/alternative; boundary="------------A1B6EF9E7788662D82A90964" Content-Language: en-US List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk This is a multi-part message in MIME format. --------------A1B6EF9E7788662D82A90964 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit 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. --------------A1B6EF9E7788662D82A90964 Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: 8bit 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.
--------------A1B6EF9E7788662D82A90964--