Skip to main content
Participant
September 5, 2022
Question

Javascript time calculation

  • September 5, 2022
  • 1 reply
  • 892 views

Hi,

I am using the code found this post (scroll to last page). https://community.adobe.com/t5/acrobat-discussions/calculating-total-time/td-p/12685649  to calculate the number of hours worked in a day.

The code works fine but i would like to add up the results in a  "total" box for the week.

Any ideas how i could achieve that ? I hope it makes sense.

The name for the boxes are  

TIME.STARTED1 TIME.FINISHED1
TIME.STARTED2 TIME.FINISHED2
.....
TIME.STARTED7 TIME.FINISHED7

 

This topic has been closed for replies.

1 reply

Participant
September 5, 2022

 

Inspiring
September 5, 2022

If the script works, why did you give us names for those fields? You need to provide names of fields where you show result and also tell us in what format you wish to show total?

Participant
September 5, 2022

Sorry I don't know coding so i tought the names of the fields are neccessarry.

The names for the results are "total_1, total_2 to total_7" and the final total i would like to be the same format if possible " x hours & x minutes" if  not any format to show the result of the added hours (example) (HH:MM) 6:20 (6 hours and 20 minutes).