pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: A. Kretschmer <akretschmer@despammed.com>
To: pgsql-sql@postgresql.org
Subject: Re: AGE function
Date: Wed, 7 Sep 2005 09:46:35 +0200
Message-ID: <20050907074635.GC18174@webserv.wug-glas.de> (raw)
In-Reply-To: <20050907050506.55141.qmail@web33402.mail.mud.yahoo.com>
References: <20050907050506.55141.qmail@web33402.mail.mud.yahoo.com>

am  06.09.2005, um 22:05:06 -0700 mailte Louise Catherine folgendes:
> When I execute this statement : 
> select AGE(TO_DATE('20041101','yyyymmdd'),
> TO_DATE('19991201','yyyymmdd'))
> ...
>  4 years 11 mons 1 day 
>  4 years 11 mons 
> 
> My question : 
> 1. How does postgre 7.3.3 calculate AGE function? 
> 2. Why the result produced by postgre 7.3.3
> is different from postgre 8.0.3 ?

How long is a month? 28 days, 29 days, 30 days, 31 days?

select TO_DATE('20041101','yyyymmdd') - TO_DATE('19991201','yyyymmdd');

This is under 7.2.1 and 8.0.3 tha same: 1797. I guess, this is a
rounding problem.


Regards, Andreas
-- 
Andreas Kretschmer    (Kontakt: siehe Header)
Heynitz:  035242/47212,      D1: 0160/7141639
GnuPG-ID 0x3FFF606C http://wwwkeys.de.pgp.net
 ===    Schollglas Unternehmensgruppe    === 



view thread (7+ messages)  latest in thread

Message-ID: <20050907074635.GC18174@webserv.wug-glas.de>
Permalink:  ../20050907074635.GC18174@webserv.wug-glas.de/
Also on:    postgresql.org/message-id/20050907074635.GC18174@webserv.wug-glas.de

 · 

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: akretschmer@despammed.com
  Subject: Re: AGE function
  In-Reply-To: <20050907074635.GC18174@webserv.wug-glas.de>

* 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