03/10/2008, 13:49
|
| | | Fecha de Ingreso: octubre-2004 Ubicación: Monterrey - México
Mensajes: 875
Antigüedad: 20 años, 2 meses Puntos: 8 | |
Respuesta: Formato a numero en SQL Sip, eslo que estoy hacieno pero ya me atore para sacar los segundos y milisegundos......
Código:
SELECT CASE WHEN DATEDIFF(hh, '2008-10-03 14:44:53.850', '2008-10-03 14:46:01.650') >= 1
THEN (DATEDIFF(ms,'2008-10-03 14:44:53.850', '2008-10-03 14:46:01.650')/3600000)
ELSE DATEDIFF(hh,'2008-10-03 14:44:53.850', '2008-10-03 14:46:01.650') END AS Horas,
CASE WHEN DATEDIFF(mi,'2008-10-03 14:44:53.850', '2008-10-03 14:46:01.650') >= 60
THEN ((DATEDIFF(ms,'2008-10-03 14:44:53.850', '2008-10-03 14:46:01.650') - 3600000)/60000)
ELSE (DATEDIFF(ms,'2008-10-03 14:44:53.850', '2008-10-03 14:46:01.650')/60000) END Minutos,
DATEDIFF(s,'2008-10-03 14:44:53.850', '2008-10-03 14:46:01.650') AS Segundos,
DATEDIFF(ms,'2008-10-03 14:44:53.850', '2008-10-03 14:46:01.650') AS Segundos
|