Received: from postgresql.org.org (webmail.postgresql.org [216.126.85.28]) by postgresql.org (8.11.3/8.11.4) with SMTP id f7EGVTP76022 for ; Tue, 14 Aug 2001 12:31:29 -0400 (EDT) (envelope-from pgsql-novice-owner@postgresql.org) Received: from deborah.paradise.net.nz (deborah.paradise.net.nz [203.96.152.32]) by postgresql.org (8.11.3/8.11.4) with ESMTP id f7DA31P88880; Mon, 13 Aug 2001 06:03:02 -0400 (EDT) (envelope-from csawtell@paradise.net.nz) Received: from there (202-0-37-152.cable.paradise.net.nz [202.0.37.152]) by deborah.paradise.net.nz (Postfix) with SMTP id 9AA3B1FA063; Mon, 13 Aug 2001 22:02:58 +1200 (NZST) Content-Type: text/plain; charset="iso-8859-1" From: Christopher Sawtell To: "macky" , , Subject: Re: [SQL] Arithmetic operation on DATE Date: Mon, 13 Aug 2001 22:03:40 +1200 X-Mailer: KMail [version 1.2.3] References: <008301c123db$ba9791f0$5764a8c0@edsamail.com> In-Reply-To: <008301c123db$ba9791f0$5764a8c0@edsamail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Message-Id: <20010813100258.9AA3B1FA063@deborah.paradise.net.nz> X-Archive-Number: 200108/59 X-Sequence-Number: 1867 On Mon, 13 Aug 2001 21:38, macky wrote: > is it possible to add a date datatype column to a number resulting to a > date...... chris=# select date(date(CURRENT_TIMESTAMP) + '6 @months'::interval); date ------------ 2002-02-13 (1 row) More of what you want? > theoretically it should do this,,, > > X is in months > > date + X = date > > --> 2001-08-20 + 6 = 2002-02-20 > > > > > > > ---------------------------------------------------------------------- > The information contained in this message (including any attachments) > is confidential and intended solely for the attention and use of the > named addressee(s). It must not be copied, distributed nor disclosed > to any person. If you are not the intended recipient, please delete > it from your system and notify sender immediately. Any disclosure, > copying or distribution thereof or any action taken or omitted to be > taken in reliance thereon is prohibited and may be unlawful. > ---------------------------------------------------------------------- > > > > ---------------------------(end of broadcast)--------------------------- > TIP 3: if posting/reading through Usenet, please send an appropriate > subscribe-nomail command to majordomo@postgresql.org so that your > message can get through to the mailing list cleanly