Calculating relative time/distance from CURRENT_TIMESTAMP

From: "Gnanakumar" <gnanam(at)zoniac(dot)com>
To: <pgsql-sql(at)postgresql(dot)org>
Subject: Calculating relative time/distance from CURRENT_TIMESTAMP
Date: 2011-08-04 07:54:39
Message-ID: 009301cc527b$c48690b0$4d93b210$@com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

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

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Amitabh Kant 2011-08-04 11:03:30 Re: Calculating relative time/distance from CURRENT_TIMESTAMP
Previous Message Raj Mathur ( राज =?utf-8?b?IOCkruCkvuCkpeClgeCksA==?=) 2011-08-04 01:58:25 Re: Generic design: char vs varchar primary keys