troubleshooting Question

MS SQL Server select specific time range - 1 day

Avatar of Larry Brister
Larry BristerFlag for United States of America asked on
Microsoft SQL Server 2008Microsoft SQL ServerAWS RDS
4 Comments1 Solution93 ViewsLast Modified:
My select below gets the correct data

However I would like to automate the actual between dates
It will always be those times - 1 day


Select i.*
From @tblTemp i
Where  DATEADD(HOUR,-4,i.DateAdded) BETWEEN '2018-09-27 11:29:00.000' AND '2018-09-27 17:31:00.00'
ASKER CERTIFIED SOLUTION
Join our community to see this answer!
Unlock 1 Answer and 4 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 4 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros