Re: date function problem - Mailing list pgsql-sql

From Tomasz Myrta
Subject Re: date function problem
Date
Msg-id 401FC647.4090505@klaster.net
Whole thread Raw
In response to date function problem  (mohan@physics.gmu.edu)
List pgsql-sql
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


pgsql-sql by date:

Previous
From: "scott.marlowe"
Date:
Subject: Re: Sometimes referential integrity seems not to work
Next
From: arun raj
Date:
Subject: request to plsql tutorial