Forum Discussion
Calculate time between opening hours
To calculate the number of hours use =(close time - open time)*24
To add 35 hours use =start time + 35/24
To do rounding to 5 minutes use =MROUND(formula or number to round, 5/60/24)
Thank you for this, but I'm sorry, I still can't get it to work. I understand the different parts but not how to put them together.
But what I wan't is the end time based on 35 hours from the starting time.
So lets say I write 2020-02-27 11:00 and want to add 35 hours and get a time and a date when the 35 hours will end.
So, not counting the closed hours and not counting the weekend.
I want the answer to be 2020-03-04 12:00 (if I'm not mistaken 🙂 )
- Riny_van_EekelenFeb 28, 2020Platinum Contributor
fresope545 The attached workbook has a working example of the required formula in it. I tested it thoroughly and sincerely hope that I didn't miss anything. In order to keep the formula reasonably clear, I chose to use some helper formulae. The model is dynamic and allows you to set the opening and closing time and the number of hours you want to jump ahead.
Thank you, Savia , for pointing out how to round time to 5 minutes.
- fresope545Mar 01, 2020Copper Contributor
Hello Riny.
So mit turns out I made a big mistake 🙂The date & time I was going to calculate from was not the starting date/time. It was the end date/time and I need to deduct from that end date to end up with the starting date.
So therefore i wonder if you could help me once again. I have tried but unfortunatelly this is a bit over my head.
Also, the time you decuct might not be full hours, it could be for example 17:40.
Any chance you can help me?
Best regards Fredrik
- PeterBartholomew1Mar 01, 2020Silver Contributor
Probably some differences in presentation if nothing else.
- fresope545Feb 28, 2020Copper Contributor
Seeing these formulas I know I would have never solved this.
Thank you so much both of you!! Very grateful 🙂