Expand my Community achievements bar.

LiveCycle form stop watch

Avatar

Level 9

Is it possible to create a stop watch that the form user can start and stop as many times as needed. When finished, the total time recorded by the stop watch would be displayed.

Example:

User starts the stop watch at 08:08:00 stop watch displays 00:00:00

User stops the stop watch at 08:45:10 stop watch displays 00:37:10

User starts the stop watch at 09:15:00 stop watch displays 00:37:10 (when started but shows time accumulating)

User stops the stop watch at 09:30:25 stop watch displays 00:52:35

Total time recorded is displayed 00:52:35

If someone has an example form, I would appreciate your help. I have seen a stop watch in an Acrobat form but do not know how to convert it to LiveCycle.

5 Replies

Avatar

Level 7

You would use the Time2Num and Num2Time functions in turn with Time(). So the start of the stopwatch would use a variable to record the current time (using Time()) and then when the watch is stopped use another variable to record the current time again. Then use Time2Num to turn both of those times into numbers which you can then minus one from the other and then use Num2Time to turn that number back into a time.

Avatar

Level 9

I understand how to get the current time and the time when the clock is stopped. I also understand how to subtract the numbers and then convert them back to time. I have never used variables. I know where they go and how to create them but do not know how to use them in a script. Is there any chance to could create an example? I need to be able to start and stop the clock several times and end up with the total time recorded.

Does anyone have an example LiveCycle form with a stop watch? Am I the only one who has ever needed this?

Avatar

Level 9

Does anyone have an example LiveCycle form with a stopwatch that you can start and stop and displays the ellapsed time? Would also need a reset button.

Anyone?

Avatar

Level 9

Yes, I had already seem that post. Thank you.

Unfortunitly, I can't figure out how to change that over to a LiveCycle form stopwatch. I am not familiar with Variables. I am trying to figure them out. I was hoping someone had an example LiveCycle form containing a stopwatch.