X-Original-To: pgsql-sql@postgresql.org Received: from serwer.skawsoft.com.pl (serwer.skawsoft.com.pl [213.25.37.66]) by postgresql.org (Postfix) with ESMTP id 23827476022 for ; Mon, 17 Mar 2003 09:31:22 -0500 (EST) Received: from klaster.net (pb138.krakow.cvx.ppp.tpnet.pl [213.76.37.138]) by serwer.skawsoft.com.pl (Postfix) with ESMTP id EDA016A1E9; Mon, 17 Mar 2003 15:31:23 +0100 (CET) Message-ID: <3E75DC7A.80200@klaster.net> Date: Mon, 17 Mar 2003 15:32:26 +0100 From: Tomasz Myrta User-Agent: Mozilla/5.0 (Windows; U; Win 9x 4.90; pl-PL; rv:1.3) Gecko/20030312 X-Accept-Language: pl, en-us, en MIME-Version: 1.0 To: Rajesh Kumar Mallah Cc: pgsql-sql@postgresql.org Subject: Re: Formatting intervals.. References: <200303171717.25857.mallah@trade-india.com> <3E75B800.7000902@klaster.net> <200303171834.54623.mallah@trade-india.com> In-Reply-To: <200303171834.54623.mallah@trade-india.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit X-Archive-Number: 200303/398 X-Sequence-Number: 12437 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