pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tomasz Myrta <jasiek@klaster.net>
To: Christoph Haller <ch@rodos.fzk.de>
Cc: mallah@trade-india.com
Cc: pgsql-sql@postgresql.org
Subject: Re: Formatting intervals..
Date: Mon, 17 Mar 2003 15:15:22 +0100
Message-ID: <3E75D87A.7020908@klaster.net> (raw)
In-Reply-To: <3E75C7BE.5BFE8C6C@rodos.fzk.de>
References: <3E75C7BE.5BFE8C6C@rodos.fzk.de>

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




view thread (15+ messages)  latest in thread

Message-ID: <3E75D87A.7020908@klaster.net>
Permalink:  ../3E75D87A.7020908@klaster.net/
Also on:    postgresql.org/message-id/3E75D87A.7020908@klaster.net

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: jasiek@klaster.net, ch@rodos.fzk.de, mallah@trade-india.com
  Subject: Re: Formatting intervals..
  In-Reply-To: <3E75D87A.7020908@klaster.net>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox