Re: Formatting intervals..

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

>>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
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.

Tomasz

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message Objectz 2003-03-17 14:25:40 Re: String aggregate function
Previous Message Christoph Haller 2003-03-17 14:09:28 Re: Formatting intervals..