Re: Formatting intervals..
| От | Christoph Haller |
|---|---|
| Тема | Re: Formatting intervals.. |
| Дата | |
| Msg-id | 3E75DB1C.CA0A3F06@rodos.fzk.de обсуждение исходный текст |
| Ответ на | Formatting intervals.. (Rajesh Kumar Mallah <mallah@trade-india.com>) |
| Ответы |
Re: Formatting intervals..
|
| Список | 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)
> >
> 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
В списке pgsql-sql по дате отправления: