From: Josh Berkus <josh@agliodbs.com>
To: Jason Wong <postgresql@gremlins.com.hk>
To: macky <macky@edsamail.com>
To: pgsql-novice@postgresql.org
Subject: Re: [SQL] Re: Arithmetic operation on DATE
Date: Tue, 14 Aug 2001 08:30:00 -0700
Message-ID: <web-101885@davinci.ethosmedia.com> (raw)
In-Reply-To: <00be01c123df$1365c380$0400000a@gremlins.com.hk>
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
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 using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: josh@agliodbs.com, postgresql@gremlins.com.hk, macky@edsamail.com, pgsql-novice@postgresql.org
Subject: Re: [SQL] Re: Arithmetic operation on DATE
In-Reply-To: <web-101885@davinci.ethosmedia.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