Calculate difference between time input?
How do I calculate the difference between two times I get from a from? Lets say time a = 09:45 and time b = 11:15 Then I want to calculate the difference. How do I calculate it? I'd also like to know how to get the answers in differen formats. For example caculating the input above I want to be able to get all of the following results: 1:30 (One hour and thirty minutes) 1,5 (One and a half hour) 90 (Ninety minutes) Help please :)
Peter Arvidsson wrote:
How do I calculate the difference between two times I get from a from?
Lets say time a = 09:45 and time b = 11:15
Then I want to calculate the difference. How do I calculate it? I'd also like to know how to get the answers in differen formats. For example caculating the input above I want to be able to get all of the following results: 1:30 (One hour and thirty minutes) 1,5 (One and a half hour) 90 (Ninety minutes)
The mxDateTime package can do this. You can access it through External Methods. Sorry there isn't an easier way yet. :-( http://starship.python.net/~lemburg/mxDateTime.html Shane
participants (2)
-
Peter Arvidsson -
Shane Hathaway