RE: Date question

From: Mike Mascari <mascarm(at)mascari(dot)com>
To: "'Boulat Khakimov'" <boulat(at)inet-interactif(dot)com>, "pgsql-sql(at)postgresql(dot)org" <pgsql-sql(at)postgresql(dot)org>, "psql-novice(at)postgresql(dot)org" <psql-novice(at)postgresql(dot)org>, "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org>
Subject: RE: Date question
Date: 2001-03-06 19:25:28
Message-ID: 01C0A649.4BBC29E0.mascarm@mascari.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-sql

How about:

SELECT '2001-03-06'::timestamp + '1 Year';

Hope that helps,

Mike Mascari

-----Original Message-----
From: Boulat Khakimov [SMTP:boulat(at)inet-interactif(dot)com]
Sent: Tuesday, March 06, 2001 2:20 PM
To: pgsql-sql(at)postgresql(dot)org; psql-novice(at)postgresql(dot)org; pgsql-general(at)postgresql(dot)org
Subject: [GENERAL] Date question

Hi,

Im a little bit stuck here.

Does anyone know how to get date in format 'YYYY-MM-DD' of a date one
year from now.
So for example today is '2001-03-06' I need to get date 12 months from
now
which will be '2002-03-06' in todays case...

In mysql I used DATE_ADD(CURDATE(), INTERVAL 12 MONTH) , but that
doesnt work in PG.

Regards,
Boulat Khakimov

--
Nothing Like the Sun

---------------------------(end of broadcast)---------------------------
TIP 3: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to majordomo(at)postgresql(dot)org so that your
message can get through to the mailing list cleanly

Browse pgsql-general by date

  From Date Subject
Next Message Michael Fork 2001-03-06 19:26:58 Re: [SQL] Date question
Previous Message Mike Mascari 2001-03-06 19:23:47 RE: SQL article

Browse pgsql-sql by date

  From Date Subject
Next Message Michael Fork 2001-03-06 19:26:58 Re: [SQL] Date question
Previous Message Boulat Khakimov 2001-03-06 19:19:59 Date question