Received: from postgresql.org.org (webmail.postgresql.org [216.126.85.28]) by postgresql.org (8.11.3/8.11.4) with SMTP id f7KEUkP37025 for ; Mon, 20 Aug 2001 10:30:46 -0400 (EDT) (envelope-from pgsql-novice-owner@postgresql.org) Received: from davinci.ethosmedia.com (davinci.ethosmedia.com [209.10.40.250]) by postgresql.org (8.11.3/8.11.4) with ESMTP id f7EFU9P50029 for ; Tue, 14 Aug 2001 11:30:09 -0400 (EDT) (envelope-from josh@agliodbs.com) Received: from [209.10.40.250] (account ) by davinci.ethosmedia.com (CommuniGate Pro WebUser 3.4.1) with HTTP id 101885; Tue, 14 Aug 2001 08:30:00 -0700 From: "Josh Berkus" Subject: Re: [SQL] Re: Arithmetic operation on DATE To: "Jason Wong" , "macky" , X-Mailer: CommuniGate Pro Web Mailer v.3.4.1 Date: Tue, 14 Aug 2001 08:30:00 -0700 Message-ID: In-Reply-To: <00be01c123df$1365c380$0400000a@gremlins.com.hk> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="_===101885====davinci.ethosmedia.com===_" X-Archive-Number: 200108/85 X-Sequence-Number: 1894 This is a multi-part MIME message --_===101885====davinci.ethosmedia.com===_ Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 8bit Jason, Macky, > expires = CURRENT_TIMESTAMP + 10 > > would be 10 days from now. Don't know about months though. That's almost correct. Try: expires := current_timestamp + '10 days'::INTERVAL For macky's question: expires := current_timestamp + '6 months'::INTERVAL I'll be posting a FAQ on data/time datatypes in PostgreSQL soon. -Josh Berkus ______AGLIO DATABASE SOLUTIONS___________________________ Josh Berkus Complete information technology josh@agliodbs.com and data management solutions (415) 565-7293 for law firms, small businesses fax 621-2533 and non-profit organizations. San Francisco --_===101885====davinci.ethosmedia.com===_ Content-Type: text/plain Content-Disposition: attachment; filename="" Content-Transfer-Encoding: base64 DQo= --_===101885====davinci.ethosmedia.com===_ Content-Type: text/plain Content-Disposition: attachment; filename="" Content-Transfer-Encoding: base64 DQo= --_===101885====davinci.ethosmedia.com===_ Content-Type: text/plain Content-Disposition: attachment; filename="" Content-Transfer-Encoding: base64 DQo= --_===101885====davinci.ethosmedia.com===_--