I can't seem to figure out how to pull results from a table between 2 specific times. I need to be able to get results specifically between 5PM(17) and 7AM, not the other way around...I can't use DAYS because obviously after 23:59 the day will change, and if i only use Hour, i think the same issue applies. I can't seem to wrap my head around the login here.
Any help is appreciated
The table in question are just records of CompanyIDs, and i'm using the createdate value in this case to only return companies that were created outside of our office hours. Result set would be something like
Cmp_ID, cmp_name, cmp_createdate,cmp_createdby
EDIT: If i run this as 2 seperate queries, first for entries with an hour >=17 and 1 where Hour <7, that gives me results for all entries, but i will need this to be a recurring report so i have to find a way to have to send 1 result set