Re: Calculating relative time/distance from CURRENT_TIMESTAMP

From: Amitabh Kant <amitabhkant(at)gmail(dot)com>
To: gnanam(at)zoniac(dot)com
Cc: pgsql-sql(at)postgresql(dot)org
Subject: Re: Calculating relative time/distance from CURRENT_TIMESTAMP
Date: 2011-08-04 11:03:30
Message-ID: CAPTAQBJ3YFkKVPm9LfQ=fRvmfBVuyAjT1nJ=mqodrsCv=+sOXA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(at)zoniac(dot)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(at)postgresql(dot)org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-sql
>

In response to

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Gnanakumar 2011-08-04 11:42:51 Re: Calculating relative time/distance from CURRENT_TIMESTAMP
Previous Message Gnanakumar 2011-08-04 07:54:39 Calculating relative time/distance from CURRENT_TIMESTAMP