How do I make it so that the place where I circled will calculate the difference in time for minutes?
Asked
Active
Viewed 56 times
-2
-
2Welcome to StackOverflow! In order for us to help you better, can you please update your question so that it shows all relevant code in a [**minimal, complete, and verifiable example**](http://stackoverflow.com/help/mcve), showcasing the code **itself**, rather than an image containing it. Being able to copy the code helps us debug it much faster. For further information, please refer to the help article regarding [**how to ask good questions**](http://stackoverflow.com/help/how-to-ask), and take the [**tour of the site**](http://stackoverflow.com/tour) :) – Obsidian Age Mar 05 '18 at 22:04
-
Hello! Sure elif timeInHours == timeOutHours and timeInMins > timeOutMins: durationStayHours = ((timeOutHours + DAILY_HOURS) - timeInHours) - 1 durationStayMins = – localnewsletter23 Mar 05 '18 at 22:08
-
Possible duplicate of [How do I find the time difference between two datetime objects in python?](https://stackoverflow.com/questions/1345827/how-do-i-find-the-time-difference-between-two-datetime-objects-in-python) – baduker Mar 05 '18 at 22:09
1 Answers
0
Have you tried using the Arrow python library for this? It provided an API to calculate range between two time points: https://arrow.readthedocs.io/en/latest/#ranges-spans. This may work for your case.

Rush
- 179
- 6
-
We havent learned to do it with any libraries so we were supposed to just use raw math and if statements for this in class – localnewsletter23 Mar 05 '18 at 22:09