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 BB3F6D1B83D for ; Tue, 3 Feb 2004 16:01:48 +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 85206-09 for ; Tue, 3 Feb 2004 12:01:37 -0400 (AST) Received: from lerami.lerctr.org (lerami.lerctr.org [207.158.72.11]) by svr1.postgresql.org (Postfix) with ESMTP id AD4DCD1D278 for ; Tue, 3 Feb 2004 12:01:36 -0400 (AST) Received: from lerlaptop-red.iadfw.net ([207.136.3.72]) by lerami.lerctr.org with asmtp (Exim 4.30) id 1Ao2zQ-00046i-AJ; Tue, 03 Feb 2004 10:01:28 -0600 Date: Tue, 03 Feb 2004 10:01:22 -0600 From: Larry Rosenman To: mohan@physics.gmu.edu, pgsql-sql@postgresql.org Subject: Re: date function problem Message-ID: <105750000.1075824082@lerlaptop-red.iadfw.net> In-Reply-To: <61599.138.88.163.115.1075823505.squirrel@physics.gmu.edu> References: <61599.138.88.163.115.1075823505.squirrel@physics.gmu.edu> X-Mailer: Mulberry/3.1.1 (Linux/x86) X-PGP-Info: All other keys are old/dead. X-PGP-Key: 0x3c49bdd6 X-PGP-Fingerprint: D0D1 3C11 F42F 6B29 FA67 6BF3 AD13 4685 3C49 BDD6 MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="==========B90EBE25CCAB4899C990==========" X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200402/32 X-Sequence-Number: 16723 --==========B90EBE25CCAB4899C990========== Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: quoted-printable Content-Disposition: inline --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=3D# select now()+'1 year'; ?column? ------------------------------- 2005-02-03 10:00:40.913383-06 (1 row) ler=3D# ler=3D# select version(); version --------------------------------------------------------------------------- --------------------- PostgreSQL 7.4.1 on i386-portbld-freebsd5.2, compiled by GCC cc (GCC)=20 3.3.3 [FreeBSD] 20031106 (1 row) ler=3D# > --mohan > > > > ---------------------------(end of broadcast)--------------------------- > TIP 5: Have you checked our extensive FAQ? > > http://www.postgresql.org/docs/faqs/FAQ.html > --=20 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 --==========B90EBE25CCAB4899C990========== Content-Type: application/pgp-signature Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.4 (FreeBSD) iD8DBQFAH8XTrRNGhTxJvdYRAj+gAKCH4W4jghTpgR5xd3mbTT1h8Fhc7ACdEXsf OfR3jtkutMQjsFqv7SoIt7c= =sv3/ -----END PGP SIGNATURE----- --==========B90EBE25CCAB4899C990==========--