Re: [MASSMAIL] Restar dos campos de tipo fecha de distintos registros

From: "Gilberto Castillo" <gilberto(dot)castillo(at)etecsa(dot)cu>
To: "Alberto Cuevas" <betocuevas(dot)net(at)gmail(dot)com>
Cc: "pgsql-es-ayuda(at)postgresql(dot)org" <pgsql-es-ayuda(at)postgresql(dot)org>
Subject: Re: [MASSMAIL] Restar dos campos de tipo fecha de distintos registros
Date: 2016-04-18 17:01:00
Message-ID: 60808.192.168.207.54.1460998860.squirrel@webmail.etecsa.cu
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-es-ayuda


> Hola a todos necesito restar dos campos de tipo fecha de distintos
> registros.
>
> FechaFinal - FechaInicial
>
> | Ord. | FechaInicial | FechaFinal |
> | 2 | *26/02/2016* | 02/03/2016 |
> | 1 | 18/02/2016 | *24/02/2016* |
>
> *24/02/2016 - 26/02/2016* =
>
> *2 dias*
> Por favor si me pueden ayudar
>
> *.*
> Saludos
>

Usa interval .. algo así:

24/02/2016 - 26/02/2016::interval= XXX

--
Saludos,
Gilberto Castillo
ETECSA, La Habana, Cuba

-
Enviado a la lista de correo pgsql-es-ayuda (pgsql-es-ayuda(at)postgresql(dot)org)
Para cambiar tu suscripcin:
http://www.postgresql.org/mailpref/pgsql-es-ayuda

In response to

Browse pgsql-es-ayuda by date

  From Date Subject
Next Message Gerardo Herzig 2016-04-18 17:20:37 Re: Restar dos campos de tipo fecha de distintos registros
Previous Message Alberto Cuevas 2016-04-18 16:36:18 Restar dos campos de tipo fecha de distintos registros