Re: Formatting intervals..

From: Rajesh Kumar Mallah <mallah(at)trade-india(dot)com>
To: Christoph Haller <ch(at)rodos(dot)fzk(dot)de>
Cc: jasiek(at)klaster(dot)net, pgsql-sql(at)postgresql(dot)org
Subject: Re: Formatting intervals..
Date: 2003-03-17 14:02:45
Message-ID: 200303171932.45934.mallah@trade-india.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

Thank you,

But i am bit confused.
nevertheless i will be able to satisfy my customers.

only last one question,
how the truncate 9 mons 9 days to only month part ie
9 mons ?

(i leave the serious discussion on you and Thomasz)

regds
mallah.

On Monday 17 Mar 2003 6:33 pm, Christoph Haller wrote:
> > >
> > > 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?
> >
> It does. As long the months between January and October are.
> So
> select age ('10-10-1999'::timestamp , '1-1-1999'::timestamp ) ;
> age
> ---------------
> 9 mons 9 days
> (1 row)
>
> Regards, Christoph
>
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 1: subscribe and unsubscribe commands go to majordomo(at)postgresql(dot)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.

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message Christoph Haller 2003-03-17 14:09:28 Re: Formatting intervals..
Previous Message J.C.M. van der Kwast 2003-03-17 13:34:41 Howto??