I need to create a query to sum day’s hours and night’s hours from a range intersec.
For example with this range:
8AM-8PM -> day
8PM-8AM -> night
and one or more start-end time period:
7.30AM 10.00PM
I would like to get this values:
12 day's hours
2.5 night's hours
I don’t know which is the bast way to accomplish this function.
As i wrote in my comment, it is a brain teaser. I hope you can combine this with your code.
Result: