Re: date function problem

From: Tomasz Myrta <jasiek(at)klaster(dot)net>
To: mohan(at)physics(dot)gmu(dot)edu, Lista dyskusyjna pgsql-sql <pgsql-sql(at)postgresql(dot)org>
Subject: Re: date function problem
Date: 2004-02-03 16:03:19
Message-ID: 401FC647.4090505@klaster.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

Dnia 2004-02-03 16:51, Użytkownik mohan(at)physics(dot)gmu(dot)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

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message scott.marlowe 2004-02-03 16:27:13 Re: Sometimes referential integrity seems not to work
Previous Message Larry Rosenman 2004-02-03 16:01:22 Re: date function problem