| From: | Marin D <marin(at)cybernet(dot)bg> |
|---|---|
| To: | Bassel Hatoum <bassel(at)gnc(dot)net> |
| Cc: | pgsql-sql(at)postgreSQL(dot)org |
| Subject: | Re: [SQL] Trouble with dates |
| Date: | 1998-05-31 16:56:13 |
| Message-ID: | Pine.LNX.3.96.980531194807.18113B-100000@server.iclub.techno-link.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-sql |
CREATE TABLE test (d DATE);
INSERT INTO test VALUES (CURRENT_DATE);
test=> SELECT DATE( DATETIME(d) + '1 month'::TIMESPAN) FROM test;
date
----------
30-06-1998
(1 row)
test=>
Hope this helps...
Marin
-= Why do we need gates in a world without fences? =-
On Sat, 30 May 1998, Bassel Hatoum wrote:
> I'm trying to add months to a date without having to calculate how many
> days in the month, etc.
> Oracle has an add_month function that would do the trick. It there
> anything similar in PGSQL? Or maybe a way to emulate it?
>
>
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Piotr Adamiak | 1998-06-01 12:29:37 | Where is the problem ? |
| Previous Message | Bassel Hatoum | 1998-05-30 22:28:37 | Trouble with dates |