Received: from phoenix.nanospace.com (phoenix.nanospace.com [209.213.199.19]) by mail.postgresql.org (8.11.1/8.11.1) with SMTP id f0OKtxq70422 for ; Wed, 24 Jan 2001 15:56:00 -0500 (EST) (envelope-from dalgoda@ix.netcom.com) Received: (qmail 8555 invoked from network); 24 Jan 2001 20:55:52 -0000 Received: from workstation-209-213-222-98.yy.com (HELO thune.mrc-home.org) (209.213.222.98) by phoenix.nanospace.com with SMTP; 24 Jan 2001 20:55:52 -0000 Received: by thune.mrc-home.org (8.10.0) id f0OKtqc29426; Wed, 24 Jan 2001 12:55:52 -0800 Date: Wed, 24 Jan 2001 12:55:52 -0800 From: Mike Castle To: pgsql-sql@postgresql.org Subject: Re: Problem with Dates Message-ID: <20010124125552.D17481@thune.yy.com> Reply-To: Mike Castle Mail-Followup-To: Mike Castle , pgsql-sql@postgresql.org References: <00ff01c0863e$c4ef8620$0101a8c0@godzone.net.nz> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.3.6i In-Reply-To: <00ff01c0863e$c4ef8620$0101a8c0@godzone.net.nz>; from agree@godzone.net.nz on Thu, Jan 25, 2001 at 08:49:27AM +1300 X-Archive-Number: 200101/339 X-Sequence-Number: 1012 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