From: | Mike Castle <dalgoda(at)ix(dot)netcom(dot)com> |
---|---|
To: | pgsql-sql(at)postgresql(dot)org |
Subject: | Re: Problem with Dates |
Date: | 2001-01-24 20:55:52 |
Message-ID: | 20010124125552.D17481@thune.yy.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-sql |
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(at)ix(dot)netcom(dot)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
From | Date | Subject | |
---|---|---|---|
Next Message | Forest Wilkinson | 2001-01-24 21:09:08 | Re: unreferenced primary keys: garbage collection |
Previous Message | Stephan Szabo | 2001-01-24 20:30:18 | Re: Making a foreign key chain - good idea or bad idea? |