On my table I have a "Datemodified" column. I was to be able to pull results based on that Column. I want to be able to pull anything from 6am to 6pm. This query needs to be able to be used everyday, so the ways I've seen, use a specific date and I can't get any of the queries I've looked for to work for my specific case.
Here is what I've gotten to work so far, it pulls the right hour time frame, but I need it to run only for the current day. Thanks all!
SELECT
Assignment
, Datemodified
, General
, IncNumber
, NextSteps
, PDCRStatus
, RootCause
, Status
, Summary
, Timings
, UserID
FROM
Turnover
WHERE
DATEPART(HOUR, datemodified) between 06 and 18
--AND datemodified = GETDATE()