X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.2]) by svr1.postgresql.org (Postfix) with ESMTP id 35194D1CA90 for ; Tue, 3 Feb 2004 16:32:16 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (neptune.hub.org [200.46.204.2]) (amavisd-new, port 10024) with ESMTP id 00629-09 for ; Tue, 3 Feb 2004 12:32:12 -0400 (AST) Received: from serwer.skawsoft.com.pl (skawina.eu.org [80.48.213.66]) by svr1.postgresql.org (Postfix) with ESMTP id 2134DD1C513 for ; Tue, 3 Feb 2004 12:32:07 -0400 (AST) Received: from klaster.net (backbone.zab.citynet.pl [212.244.6.69]) by serwer.skawsoft.com.pl (Postfix) with ESMTP id 6596A2B3CB; Tue, 3 Feb 2004 17:01:24 +0100 (CET) Message-ID: <401FC647.4090505@klaster.net> Date: Tue, 03 Feb 2004 17:03:19 +0100 From: Tomasz Myrta User-Agent: Mozilla/5.0 (Windows; U; Win 9x 4.90; pl-PL; rv:1.6b) Gecko/20031208 X-Accept-Language: pl, en-us, en MIME-Version: 1.0 To: mohan@physics.gmu.edu, Lista dyskusyjna pgsql-sql Subject: Re: date function problem References: <61599.138.88.163.115.1075823505.squirrel@physics.gmu.edu> In-Reply-To: <61599.138.88.163.115.1075823505.squirrel@physics.gmu.edu> Content-Type: text/plain; charset=ISO-8859-2; format=flowed Content-Transfer-Encoding: 8bit X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200402/35 X-Sequence-Number: 16726 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