From: | Jie Liang <jliang(at)ipinc(dot)com> |
---|---|
To: | Boulat Khakimov <boulat(at)inet-interactif(dot)com> |
Cc: | pgsql-sql(at)postgresql(dot)org, psql-novice(at)postgresql(dot)org, pgsql-general(at)postgresql(dot)org |
Subject: | Re: [SQL] Date question |
Date: | 2001-03-06 20:02:55 |
Message-ID: | Pine.BSF.4.10.10103061200270.89658-100000@tidal.ipinc.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general pgsql-sql |
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(at)ipinc(dot)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(at)postgresql(dot)org)
>
From | Date | Subject | |
---|---|---|---|
Next Message | Ned Lilly | 2001-03-06 20:09:23 | Re: [GENERAL] SQL article |
Previous Message | Soma Interesting | 2001-03-06 20:00:05 | Fwd: Re: time to integer |
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2001-03-06 20:10:52 | Re: Problems with RULE |
Previous Message | Tom Lane | 2001-03-06 19:54:28 | Re: Mis-firing of rules with a WHERE condition |