diferencia de horas:
Código SQL:
Ver originalDECLARE @FISAP DATETIME = '2012-12-01 08:00:00'
DECLARE @FFSAP DATETIME = '2012-12-01 10:30:00'
DECLARE @ok VARCHAR(20)
SELECT @ok=CONVERT(VARCHAR(20),CAST(datediff(mi,@FISAP,@FFSAP) / 60 AS DECIMAL(9,3)) + CAST(CAST(datediff(mi,@FISAP,@FFSAP) % 60 AS DECIMAL(9,3))/60 AS DECIMAL(9,3)))
print @ok
saludos!