I am looking for a function that would return the number of minutes in and outside of a specific time frame.
For example:
A worker worked between 4PM and 8PM in one day and the day time is between 6AM and 6PM, I need the function to return 120mins day time and 120mins night time.
Another example would be someone worked between 8PM and 2AM the next day, then the function would return 360mins night time.
I don’t to run a loop as the function needs to be fast.
The Saints is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.