pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Jason Wong <postgresql@gremlins.com.hk>
To: macky <macky@edsamail.com>
To: pgsql-novice@postgresql.org
To: pgsql-sql@postgresql.org
Subject: Re: Arithmetic operation on DATE
Date: Mon, 13 Aug 2001 18:02:34 +0800
Message-ID: <00be01c123df$1365c380$0400000a@gremlins.com.hk> (raw)
References: <001401c123dd$2c383430$5764a8c0@edsamail.com>

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
> 




view thread (8+ messages)  latest in thread

Message-ID: <00be01c123df$1365c380$0400000a@gremlins.com.hk>
Permalink:  ../00be01c123df$1365c380$0400000a@gremlins.com.hk/
Also on:    postgresql.org/message-id/00be01c123df$1365c380$0400000a@gremlins.com.hk

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: postgresql@gremlins.com.hk, macky@edsamail.com, pgsql-novice@postgresql.org
  Subject: Re: Arithmetic operation on DATE
  In-Reply-To: <00be01c123df$1365c380$0400000a@gremlins.com.hk>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox