Posted By

edwinet on 04/04/11


Tagged


Versions (?)

Get last run time


 / Published in: SQL
 

  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  

You need to login to post a comment.