Re: [NOVICE] Arithmetic operation on DATE - Mailing list pgsql-sql

From Jason Wong
Subject Re: [NOVICE] Arithmetic operation on DATE
Date
Msg-id 00be01c123df$1365c380$0400000a@gremlins.com.hk
Whole thread Raw
In response to Arithmetic operation on DATE  ("macky" <macky@edsamail.com>)
List pgsql-sql
I know you can do it for days, thus:

   expires = CURRENT_TIMESTAMP + 10

would be 10 days from now. Don't know about months though.

HTH
--
Jason Wong
Gremlins Associates
www.gremlins.com.hk


----- Original Message -----
From: macky <macky@edsamail.com>
To: <pgsql-novice@postgresql.org>; <pgsql-sql@postgresql.org>
Sent: Monday, August 13, 2001 5:48 PM
Subject: [NOVICE] Arithmetic operation on DATE


> is it possible to add a date datatype column to a number resulting to a
> date......
>
>
> theoretically it should do this,,,
>
> X is in months
>
> date + X = date
>
> -->  2001-08-20 + 6 = 2002-02-20
>


pgsql-sql by date:

Previous
From: "Jeff Eckermann"
Date:
Subject: Re: create function using language SQL
Next
From: Tom Lane
Date:
Subject: Re: create function using language SQL