0

I want to accumulate time into a variable (Time1) and have it count hours, minutes and seconds. It should not carry over to date when it passes 24:00:00 but should go to 25:00:00.

For example, if I have 22:00:00 hours on a project and spend another 10:00:00 hours the total should read 32:00:00.

Thoughts appreviated...
Emerogork

3
Contributors
3
Replies
4
Views
8 Years
Discussion Span
Last Post by Emerogork
0

then you need to findout the time difference between the start time and end time and keep on adding them

0

Not sure why time variables are required..... I'd simply use integers (cast the time function or date function to int) and have a timer that updates once a minute (or second). A Few if's a few minute = minute + 1's and you should be good to go. Just remember, that the timer control isn't 100% accurate, and after a few days, the time it keeps and the time it really is, may be off. Not a big deal though, unless you plan to work days at a time straight on through. In which case you would need time precision.

0

Actually my program is using a timer to accumulate seconds for an operation. I want to display it in a "00:00:00" format, save the accumulated time and when I enter that operation again, to add the new time used to the original accumulated time. I will end up with thousands of seconds. I am not partial to the saving of seconds in my array and file but it does seem to work for what I have programmed so far

For example:
1) start a project for 180 seconds, display 3 minutes (00:03:00) and store the 180 seconds.
2) go off to another operation for 600 seconds, display 10 minutes (00:10:00) and store the 600 seconds.
3) return to the original operation for another 120 seconds and display 5 minutes. (00:05:00)

While I am in the operation, I will be showing the seconds as they tick off again in "00:00:00" format.

I have used many lines to do the math and to show "00" format for seconds, minutes, hours less than 10 (6 minutes as 06 minutes)

I was hoping there would be a function that will show 00:06:24, 00:06:25, 00:06:26... and be able to continue in hours after 24 hours have lapsed. 23:59:58, 23:59:59, 24:00:00, 24:00:01...
Thoughts appreciated

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.