X-Original-To: pgsql-sql@postgresql.org Received: from trade-india.com (ns5.trade-india.com [66.234.10.13]) by postgresql.org (Postfix) with SMTP id 59707475AE5 for ; Mon, 17 Mar 2003 08:04:21 -0500 (EST) Received: (qmail 10876 invoked by uid 505); 17 Mar 2003 13:04:12 -0000 Received: from mallah@trade-india.com by ns5.trade-india.com by uid 502 with qmail-scanner-1.15 (uvscan: v4.1.60/v4171. Clear:. Processed in 1.813032 secs); 17 Mar 2003 13:04:12 -0000 Received: from mail-relay.trade-india.com (HELO system67.trade-india-local.com) (203.196.129.235) by ns5.trade-india.com with SMTP; 17 Mar 2003 13:04:10 -0000 From: Rajesh Kumar Mallah Organization: Infocom Network Limited To: Tomasz Myrta Subject: Re: Formatting intervals.. Date: Mon, 17 Mar 2003 18:34:54 +0530 User-Agent: KMail/1.5 Cc: pgsql-sql@postgresql.org References: <200303171717.25857.mallah@trade-india.com> <3E75B800.7000902@klaster.net> In-Reply-To: <3E75B800.7000902@klaster.net> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200303171834.54623.mallah@trade-india.com> X-Archive-Number: 200303/392 X-Sequence-Number: 12431 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. On Monday 17 Mar 2003 5:26 pm, Tomasz Myrta wrote: > Uz.ytkownik Rajesh Kumar Mallah napisa?: > > Hi, > > > > Is it possible to customize interval display. > > > > eg, > > > > tradein_clients=# SELECT cast ('10-10-1999'::timestamp - '1-1-1999'::timestamp AS interval); > > +----------+ > > | interval | > > +----------+ > > | 282 days | > > +----------+ > > (1 row) > > > > can i display it in months and days.. > It doesn't make sense. You don't have whole date, so how long should > month be? 28? 29? 30? 31? > > Regards, > Tomasz Myrta > > > ---------------------------(end of broadcast)--------------------------- > TIP 6: Have you searched our list archives? > > http://archives.postgresql.org > > -- Rajesh Kumar Mallah, Project Manager (Development) Infocom Network Limited, New Delhi phone: +91(11)6152172 (221) (L) ,9811255597 (M) Visit http://www.trade-india.com , India's Leading B2B eMarketplace.