Re: date function problem - Mailing list pgsql-sql

From Larry Rosenman
Subject Re: date function problem
Date
Msg-id 105750000.1075824082@lerlaptop-red.iadfw.net
Whole thread Raw
In response to date function problem  (mohan@physics.gmu.edu)
List pgsql-sql

--On Tuesday, February 03, 2004 10:51:45 -0500 mohan@physics.gmu.edu wrote:

> 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

ler=# select now()+'1 year';          ?column?
-------------------------------2005-02-03 10:00:40.913383-06
(1 row)

ler=#

ler=# select version();                                           version
---------------------------------------------------------------------------
---------------------PostgreSQL 7.4.1 on i386-portbld-freebsd5.2, compiled by GCC cc (GCC)
3.3.3 [FreeBSD] 20031106
(1 row)

ler=#


> --mohan
>
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 5: Have you checked our extensive FAQ?
>
>                http://www.postgresql.org/docs/faqs/FAQ.html
>



--
Larry Rosenman                     http://www.lerctr.org/~ler
Phone: +1 972-414-9812                 E-Mail: ler@lerctr.org
US Mail: 1905 Steamboat Springs Drive, Garland, TX 75044-6749

pgsql-sql by date:

Previous
From: mohan@physics.gmu.edu
Date:
Subject: date function problem
Next
From: "scott.marlowe"
Date:
Subject: Re: Sometimes referential integrity seems not to work