GTHell
154
9
General

Help - Calculate the time span in time range between checkin & checkout

Posted 9 months ago by GTHell

I have a time range of 20:00-8:00 and I want to calculate the time span between checkout and checkin but only count the time that is inside the time range. For example, if I checkin in 2019-09-15 23:00:00 and checkout at 2019-09-16 10:00:00 then the time span is only 9 hours.

Has anyone done something like this before? Seem easy to solve from reading but inevitable without using formula or face a if-else hell.

Please sign in or create an account to participate in this conversation.

Reply to

Use Markdown with GitHub-flavored code blocks.