| From: | Alvaro Herrera <alvherre(at)commandprompt(dot)com> |
|---|---|
| To: | "mAyErLiNg (dot)M(dot)" <mmayerling4(at)hotmail(dot)com> |
| Cc: | Terry Yapt <yapt(at)technovell(dot)com>, pgsql-es-ayuda(at)postgresql(dot)org |
| Subject: | Re: Manejo de Fechas |
| Date: | 2008-06-11 15:26:45 |
| Message-ID: | 20080611152645.GL5352@alvh.no-ip.org |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-es-ayuda |
mAyErLiNg .M. escribió:
> Pero la fecha esta en este formato 2008-01-21 00:00:00, con date no me funciona y coloco select cast('2008-01-21 00:00:00' as timestamp) + 365 y me da el siguiente error: ERROR: operator does not exist: timestamp without time zone + integer
Ojo, un año no son necesariamente 365 días. Si quieres sumar un año,
debes usar el interval '1 year' (o '12 months' que es lo mismo).
--
Alvaro Herrera http://www.CommandPrompt.com/
The PostgreSQL Company - Command Prompt, Inc.
| From | Date | Subject | |
|---|---|---|---|
| Next Message | mAyErLiNg .M. | 2008-06-11 15:28:39 | RE: Manejo de Fechas |
| Previous Message | Alvaro Herrera | 2008-06-11 15:24:08 | Re: Manejo de Fechas |