RobbieC
Active Member
- Joined
- Dec 14, 2016
- Messages
- 376
- Office Version
- 2010
- Platform
- Windows
Hi there, I have a userform which displays a time in a textbox (StartTime), for example 11:15
I have a second input box which the user types in the number of minutes a task has taken (TimeTaken) - this is always in minutes (eg 6hrs = 360)
And there is a third textbox (EndTime) which is calculated from the StartTime + TimeTaken...
My question is "how do I add the two together to get the EndTime?"
If the StartTime is 11:15 and the TimeTaken is 185 minutes the EndTime should be 14:20
But what happens if the StartTime is 22:45 and the TimeTaken is 360minutes? The EndTime is 04:45...
But how? Is it a case of converting everything to minutes and then converting back to hours at the end? I dunno the best way to go about this...
If you can give me a nudge in the right direction, I'd be very grateful
Thanks
I have a second input box which the user types in the number of minutes a task has taken (TimeTaken) - this is always in minutes (eg 6hrs = 360)
And there is a third textbox (EndTime) which is calculated from the StartTime + TimeTaken...
My question is "how do I add the two together to get the EndTime?"
If the StartTime is 11:15 and the TimeTaken is 185 minutes the EndTime should be 14:20
But what happens if the StartTime is 22:45 and the TimeTaken is 360minutes? The EndTime is 04:45...
But how? Is it a case of converting everything to minutes and then converting back to hours at the end? I dunno the best way to go about this...
If you can give me a nudge in the right direction, I'd be very grateful
Thanks