Re: [SQL] Date question
От | Jie Liang |
---|---|
Тема | Re: [SQL] Date question |
Дата | |
Msg-id | Pine.BSF.4.10.10103061200270.89658-100000@tidal.ipinc.com обсуждение исходный текст |
Ответ на | Date question (Boulat Khakimov <boulat@inet-interactif.com>) |
Список | 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 по дате отправления: