Re: [SQL] Date question - Mailing list pgsql-general

From Jie Liang
Subject Re: [SQL] Date question
Date
Msg-id Pine.BSF.4.10.10103061200270.89658-100000@tidal.ipinc.com
Whole thread Raw
In response to Date question  (Boulat Khakimov <boulat@inet-interactif.com>)
List pgsql-general

you can say:

(now() + '1year'::timespan)::date

Jie LIANG

St. Bernard Software

10350 Science Center Drive
Suite 100, San Diego, CA 92121
Office:(858)320-4873

jliang@ipinc.com
www.stbernard.com
www.ipinc.com

On Tue, 6 Mar 2001, Boulat Khakimov wrote:

> 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 2: you can get off all lists at once with the unregister command
>     (send "unregister YourEmailAddressHere" to majordomo@postgresql.org)
>


pgsql-general by date:

Previous
From: Mark Stosberg
Date:
Subject: FYI: ODP Postgres editor position available
Next
From: Ben
Date:
Subject: Re: epoch <-> timestamp