Contact Us

Use the form on the right to contact us.

You can edit the text in this area, and change where the contact form on the right submits to, by entering edit mode using the modes on the bottom right. 


Oak Ridge, TN, 37830
United States

Sql-Sangria

Test Time Difference

Wade Cantley

Peppermint Spiral of Time

  • 1 shot White Godiva liqueur
  • 1 shot White Crème de Menthe
  • 0.50 shot Green Crème de Menthe
  • chocolate syrup

Sometimes we just need to know how long something takes.  This is what I use to test sections of code.

-- BEGIN TIMED TEST --
DECLARE @timeTest DATETIME
SET @timeTest = GETDATE()
-- BEGIN TIMED TEST --


-- Code to test for length of time


-- END TIMED TEST
SELECT DATEDIFF(millisecond, @timeTest, GETDATE()) AS [in Milliseconds]
, DATEDIFF(millisecond, @timeTest, GETDATE()) / 1000 AS [in Seconds]
-- END TIMED TEST