Re: Formatting intervals..

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

Yes,

I now understand what tomasz is talking . just
bare interval cannot be converted to months/days
we need at least one of the end points.

thanks to both of you.

Regds
Mallah.

On Monday 17 Mar 2003 7:56 pm, Christoph Haller wrote:
> >
> > >>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)
> > >
> > Your example above is related to some real date, so we know how many
> > days each month have. When using interval - we don't know how many
> days
> > each month should have. beacuse interval is unrelated to date.
> >
> Sorry, but it wasn't my example, it was Mallah's.
> But of course you're right on "interval is unrelated to date".
>
> 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

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message J.C.M. van der Kwast 2003-03-17 16:48:27 Min values?
Previous Message Achilleus Mantzios 2003-03-17 14:41:44 Re: How to compare dates?