Re: AYUDA CON SUMA DE FECHAS Y HORAS............

From: Alvaro Herrera <alvherre(at)dcc(dot)uchile(dot)cl>
To: Nathaly <nathaly_ec(at)hotmail(dot)com>
Cc: Comunidad PostgreSQL <pgsql-es-ayuda(at)postgresql(dot)org>
Subject: Re: AYUDA CON SUMA DE FECHAS Y HORAS............
Date: 2004-09-10 21:20:10
Message-ID: 20040910212010.GA13002@dcc.uchile.cl
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-es-ayuda

On Sat, Aug 21, 2004 at 04:08:53PM -0500, Nathaly wrote:

> alguien me puede indicar como puedo sumar fechas y horas en postgres...

alvherre=# select '2004-10-28'::date + '00:15:00'::interval;
?column?
---------------------
2004-10-28 00:15:00
(1 fila)

alvherre=# select '2004-10-28'::date + '15 minutes'::interval;
?column?
---------------------
2004-10-28 00:15:00
(1 fila)

alvherre=# select '2004-10-28'::date + 28 * '1 minutes'::interval;
?column?
---------------------
2004-10-28 00:28:00
(1 fila)

alvherre=# select '2004-10-28'::date + '04:00:00'::time;
?column?
---------------------
2004-10-28 04:00:00
(1 fila)

--
Alvaro Herrera (<alvherre[a]dcc.uchile.cl>)
"Linux transformó mi computadora, de una `máquina para hacer cosas',
en un aparato realmente entretenido, sobre el cual cada día aprendo
algo nuevo" (Jaime Salinas)

In response to

Browse pgsql-es-ayuda by date

  From Date Subject
Next Message pillit 2004-09-10 22:52:46 Re: PostGIs en Wndows
Previous Message Noe Monreal 2004-09-10 15:23:07 PostGIs en Wndows