Re: Calculating relative time/distance from CURRENT_TIMESTAMP - Mailing list pgsql-sql

From Amitabh Kant
Subject Re: Calculating relative time/distance from CURRENT_TIMESTAMP
Date
Msg-id CAPTAQBJ3YFkKVPm9LfQ=fRvmfBVuyAjT1nJ=mqodrsCv=+sOXA@mail.gmail.com
Whole thread
In response to Calculating relative time/distance from CURRENT_TIMESTAMP  ("Gnanakumar" <gnanam@zoniac.com>)
Responses Re: Calculating relative time/distance from CURRENT_TIMESTAMP
List pgsql-sql
Have you looked into the date time functions already ?

http://www.postgresql.org/docs/9.0/static/functions-datetime.html


Amitabh Kant

On Thu, Aug 4, 2011 at 1:24 PM, Gnanakumar <gnanam@zoniac.com> wrote:
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



--
Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-sql

pgsql-sql by date:

Previous
From: "Gnanakumar"
Date:
Subject: Calculating relative time/distance from CURRENT_TIMESTAMP
Next
From: "Gnanakumar"
Date:
Subject: Re: Calculating relative time/distance from CURRENT_TIMESTAMP