Hi
I know how to calculate day shift and night shift hours.
Now I need to calculate some periods into the day and night shift:

Night Shift is 22:00 to 6:00 and day shift is 6:00 to 22:00.
However, some work has to be done in some periods of the shift and every day is different

For example:
1st Sub shift - 00:50 to 04:20
2nd Sub shift - 05:20 to 06:50
3rd Sub shift - 12:50 to 13:50
4th Sub shift - 16:00 to 16:30

So how to get a formula to calculate total of day subshift and night subshift hours each day?

Thanks in advance