From: Mike Mascari <mascarm@mascari.com>
To: 'Boulat Khakimov' <boulat@inet-interactif.com>
To: pgsql-sql@postgresql.org <pgsql-sql@postgresql.org>
To: psql-novice@postgresql.org <psql-novice@postgresql.org>
To: pgsql-general@postgresql.org <pgsql-general@postgresql.org>
Subject: RE: Date question
Date: Tue, 6 Mar 2001 14:25:28 -0500
Message-ID: <01C0A649.4BBC29E0.mascarm@mascari.com> (raw)
How about:
SELECT '2001-03-06'::timestamp + '1 Year';
Hope that helps,
Mike Mascari
-----Original Message-----
From: Boulat Khakimov [SMTP:boulat@inet-interactif.com]
Sent: Tuesday, March 06, 2001 2:20 PM
To: pgsql-sql@postgresql.org; psql-novice@postgresql.org; pgsql-general@postgresql.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@postgresql.org so that your
message can get through to the mailing list cleanly
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: mascarm@mascari.com, boulat@inet-interactif.com, psql-novice@postgresql.org, pgsql-general@postgresql.org
Subject: RE: Date question
In-Reply-To: <01C0A649.4BBC29E0.mascarm@mascari.com>
* 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