Received: from maia.hub.org (maia-5.hub.org [200.46.204.29]) by mail.postgresql.org (Postfix) with ESMTP id 8CF2FB5DBD9 for ; Fri, 5 Aug 2011 06:13:28 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.29]) (amavisd-maia, port 10024) with ESMTP id 05766-07 for ; Fri, 5 Aug 2011 09:13:22 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from rs73.luxsci.com (rs73.luxsci.com [64.49.254.135]) by mail.postgresql.org (Postfix) with ESMTP id 4F92FB5DBD8 for ; Fri, 5 Aug 2011 06:13:21 -0300 (ADT) Received: from GNANAM (NSG-Static-233.156.72.182.airtel.in [182.72.156.233] (may be forged)) (authenticated bits=0) by rs73.luxsci.com (8.13.8/8.13.8) with ESMTP id p759D4PT009878; Fri, 5 Aug 2011 04:13:16 -0500 Reply-To: From: "Gnanakumar" To: "'Samuel Gendler'" Cc: "'Amitabh Kant'" , References: <009301cc527b$c48690b0$4d93b210$@com> <001201cc529b$adc7c220$09574660$@com> In-Reply-To: Subject: Re: Calculating relative time/distance from CURRENT_TIMESTAMP Date: Fri, 5 Aug 2011 14:37:08 +0530 Organization: Zoniac Software Private Limited Message-ID: <009001cc534f$12625de0$372719a0$@com> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable X-Mailer: Microsoft Office Outlook 12.0 Thread-Index: AcxS9VHQ6ODCQZ9WRgCg4P2+VaVfJgAWWv7g Content-Language: en-us X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.9 tagged_above=-5 required=5 tests=BAYES_00=-1.9 X-Spam-Level: X-Archive-Number: 201108/19 X-Sequence-Number: 35687 > If you really want a flexible function for doing this, I suspect you = could replicate the functionality of jquery's 'timeago' module in a stored = proc relatively easily. http://timeago.yarp.com/=A0It is MIT licensed, so you = can copy the logic without restriction. =A0It makes reference to being = derivative of a ruby project, so you could probably grab that code and convert it = to ruby-pg very easily. =A0 Thanks for that useful link. I believe in my case this will work out. Thanks again.