Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Javascript time calculation

New Here ,
Sep 05, 2022 Sep 05, 2022

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

 

TOPICS
JavaScript , PDF forms
766
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Sep 05, 2022 Sep 05, 2022

 

pic.jpgexpand image

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Enthusiast ,
Sep 05, 2022 Sep 05, 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?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Sep 05, 2022 Sep 05, 2022
LATEST

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).

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines