Ver Mensaje Individual
  #1 (permalink)  
Antiguo 21/01/2008, 03:08
Avatar de Althor
Althor
 
Fecha de Ingreso: mayo-2006
Mensajes: 12
Antigüedad: 18 años
Puntos: 0
Segundos transcurridos entre dos timestamps

Hola, ¿cómo puedo calcular los segundos que hay entre dos timestamps dados?.

Registro el timestamp al inicio y al fin de un proceso y quiero calcular la duración.

select systimestamp, systimestamp-tiempo_inicio from XXXX where id=XXX;
devuelve:
SYSTIMESTAMP TIEMPO_INICIO DIFF
------------- ------------------------- -----------
21/01/08 10:06:38,971059000 +01:00 20/01/83 09:08:51,332659000 9132 0:57:47.638400000

y quiero pasar los 9132 días, 57 minutos y 47.638400000 segundos, todo a segundos.

Muchas gracias.