http://stackoverflow.com/questions/13682754/creating-time-intervals-in-mssql
Q&A for committed Christians, experts in Christianity and those interested in learning more
DECLARE @startDate DATETIME = '2012-12-03 00:00:00.000'; DECLARE @endDate DATETIME = '2012-12-03 00:20:00.000'; DECLARE @nOfIntervals INT = DATEDIFF(second, @startDate, @endDate); SELECT DATEADD(second, 10, @startDate); SELECT @nOfIntervals;