From: Mike Castle <dalgoda@ix.netcom.com>
To: pgsql-sql@postgresql.org
Subject: Re: Problem with Dates
Date: Wed, 24 Jan 2001 12:55:52 -0800
Message-ID: <20010124125552.D17481@thune.yy.com> (raw)
In-Reply-To: <00ff01c0863e$c4ef8620$0101a8c0@godzone.net.nz>
References: <00ff01c0863e$c4ef8620$0101a8c0@godzone.net.nz>
On Thu, Jan 25, 2001 at 08:49:27AM +1300, Glen and Rosanne Eustace wrote:
> I am using 7.0.3,
> I have a column tstamp defined to be 'date';
>
> With a current value of '31-12-2000',
> if I update tstamp=tstamp+'1 year'::timespan
> I get '1-1-2002'
This almost sounds like it takes the year 2000, figures out it needs 366
days, and uses that for "1 year".
However, I don't see that error myself:
template1=> select '2000-12-31'::timestamp+'1 year';
?column?
------------------------
2001-12-31 00:00:00-08
(1 row)
template1=> select '2000-12-31'::timestamp+'1 year'::timespan;
?column?
------------------------
2001-12-31 00:00:00-08
(1 row)
mrc
--
Mike Castle Life is like a clock: You can work constantly
dalgoda@ix.netcom.com and be right all the time, or not work at all
www.netcom.com/~dalgoda/ and be right at least twice a day. -- mrc
We are all of us living in the shadow of Manhattan. -- Watchmen
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 from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-sql@postgresql.org
Cc: dalgoda@ix.netcom.com
Subject: Re: Problem with Dates
In-Reply-To: <20010124125552.D17481@thune.yy.com>
References: <00ff01c0863e$c4ef8620$0101a8c0@godzone.net.nz> <20010124125552.D17481@thune.yy.com>
* 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