Get last run time


/ Published in: SQL
Save to your folder(s)



Copy this code and paste it in your HTML
  1. DECLARE @INTERVALO INT, @ULTIMA_CORRIDA DATETIME
  2. SET @INTERVALO = 5
  3. SELECT @INTERVALO = 5, @ULTIMA_CORRIDA = DATEADD(MINUTE, -4, GETDATE())
  4. SELECT DATEDIFF(MINUTE, @ULTIMA_CORRIDA, GETDATE())

Report this snippet


Comments


You need to login to view comments.