From: Tomasz Myrta <jasiek@klaster.net>
To: mohan@physics.gmu.edu, Lista dyskusyjna pgsql-sql <pgsql-sql@postgresql.org>
Subject: Re: date function problem
Date: Tue, 03 Feb 2004 17:03:19 +0100
Message-ID: <401FC647.4090505@klaster.net> (raw)
In-Reply-To: <61599.138.88.163.115.1075823505.squirrel@physics.gmu.edu>
References: <61599.138.88.163.115.1075823505.squirrel@physics.gmu.edu>
Dnia 2004-02-03 16:51, Użytkownik mohan@physics.gmu.edu napisał:
> Hi All
> I have an expiration_date column in my table with data type as timestamp.
> I need to set that as one year after the current time. how do i do that. I
> am getting a casting problem whenever i try something.
>
> something like now()+ 1 year. Please let me know
now()+'1 year'::interval
I suggest you reading more about interval datatype in documentation.
Regards,
Tomasz Myrta
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: jasiek@klaster.net
Subject: Re: date function problem
In-Reply-To: <401FC647.4090505@klaster.net>
* 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