Re: Formatting intervals..

From: Tomasz Myrta <jasiek(at)klaster(dot)net>
To: Rajesh Kumar Mallah <mallah(at)trade-india(dot)com>
Cc: pgsql-sql(at)postgresql(dot)org
Subject: Re: Formatting intervals..
Date: 2003-03-17 14:32:26
Message-ID: 3E75DC7A.80200@klaster.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

Uz.ytkownik Rajesh Kumar Mallah napisa?:
>
> Yes i realize what your are saying.
> its not a valid calculation.
>
> actually my original problem is
> that i have to display this duration
> in a human friendly way in my website.
>
> shud i divide by 30 and tell the customer
> that its approximate ?
>
> but even that sounds amatuerish to me.
> hope i will be able to explain the marketing
> guys ;-)
>
>
>
> regds
> mallah.

What about this:
select age('1970-1-1'::date+your_interval,'1970-1-1'::date);

It should give you best result - the answer is true in 75% cases
(depending on year)

Tomasz

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message Achilleus Mantzios 2003-03-17 14:41:44 Re: How to compare dates?
Previous Message Christoph Haller 2003-03-17 14:26:36 Re: Formatting intervals..