Calculating night time working hours (military)
Hello,
I'm working on a spreadsheet which would automatically calculate the amount of night hours worked.
Night hours are calculated militarily from 22:00 until 6:00 in the morning. It's a spreadsheet which other people are using, so I'd like "6:00" to be inputted as such and not "30:00" even if it's finally formatted as "6:00".
The example result I'd like to achieve is:
From: 21:00
To: 7:00
Night: 8:00
The problem I'm having is how to qualify the night hours.
Thanks in advance for any pointers, Alex
It would better (much better!) be entered as "2021-01-04 6:00". Having "time" without date is not a point in time, but just some meaningless characters.
Of course, you can also combine "date" from some place with "time" in another, to get the points in time for further processing.
And yes, this is unrelated to the task of finding only night hours in some time interval. That's why I'm putting it to comment.
Thanks for the pointer. The problem I'm having is how to arrive at this result. Rather than having the user input the date and time in a cell, I'd have to add the time to the date. But I don't know how to calculate that the time past midnight should add a day.