pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Gnanakumar <gnanam@zoniac.com>
To: pgsql-sql@postgresql.org
Subject: Calculating relative time/distance from CURRENT_TIMESTAMP
Date: Thu, 4 Aug 2011 13:24:39 +0530
Message-ID: <009301cc527b$c48690b0$4d93b210$@com> (raw)

Hi,

Is there any built-in function/add-on module available in PostgreSQL, that
converts a given "timestamp"/"timestamptz" value into its relative distance
from CURRENT_TIMESTAMP?  For example, relative distance as today, yesterday,
5 minutes ago, 1 week ago, etc.

Regards,
Gnanam





view thread (6+ messages)  latest in thread

Message-ID: <009301cc527b$c48690b0$4d93b210$@com>
Permalink:  ../009301cc527b$c48690b0$4d93b210$@com/
Also on:    postgresql.org/message-id/009301cc527b$c48690b0$4d93b210$@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 using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: gnanam@zoniac.com
  Subject: Re: Calculating relative time/distance from CURRENT_TIMESTAMP
  In-Reply-To: <009301cc527b$c48690b0$4d93b210$@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