Ver Mensaje Individual
  #6 (permalink)  
Antiguo 12/10/2010, 13:44
Avatar de huesos52
huesos52
Colaborador
 
Fecha de Ingreso: febrero-2009
Ubicación: Manizales - Colombia
Mensajes: 5.980
Antigüedad: 15 años, 2 meses
Puntos: 360
Respuesta: Promedio entre fechas

Código SQL:
Ver original
  1. postgres=> SELECT EXTRACT(epoch FROM ('2010-10-14 00:00:00'::TIMESTAMP - '2010-10-13 00:00:00'::TIMESTAMP))/60/60 AS tiempo_en_horas;
  2.  tiempo_en_horas
  3. -----------------
  4.               24
  5. (1 fila)

saludos
__________________
Without data, You are another person with an opinion.
W. Edwads Deming