You should be able to query based on the datetime. Try using BETWEEN?DROP TABLE DateTableGOCREATE TABLE DateTable ( Id INT IDENTITY(1, 1) PRIMARY KEY, RandomDate DATETIME NULL)GODECLARE @ctr INTSET @ctr = 1000WHILE @ctr > 0 --Here we generate 1000 dates centered about the current time.BEGIN INSERT INTO DateTable VALUES (DATEADD(mi, (0.5 - RAND())*48*60, GETDATE())) SET @ctr = @ctr - 1ENDGO--If everything went according to plan this should give about 500 records.SELECT * FROM DateTable WHERE RandomDate BETWEEN DATEADD(mi, -12*60, GETDATE()) AND DATEADD(mi, 12*60, GETDATE())GO