Skip to main content
Participant
November 2, 2021
Question

Simple Time calculation

  • November 2, 2021
  • 1 reply
  • 581 views

Hello All

I realise this has been asked many times, but I am truly struggling to find a simple script.

I have three columns

A= Start Time (in 24hr time format)

B = End Time (in 24 hour time format)

C = Total Hours (in 24 hour time format

how do I subtract B from A to get a time in C (in 24hr time format)

There are no dropdowns in any column, user enters data as time in A & B

There are also multiple rows, so I'd need each one to calculate seperately

Plus do a total calculation at bottom

I have included picture of what I am trying to achieve

 

I am literally pulling my hair out, have tried just about every variation I have found on here 😞

This topic has been closed for replies.

1 reply

try67
Community Expert
Community Expert
November 2, 2021

This requires using a script. These tutorials explain the subject in quite detail:

https://acrobatusers.com/tutorials/working-with-date-and-time-in-acrobat-javascript

https://acrobatusers.com/tutorials/working-with-date-and-time-in-acrobat-javascript-part-2

https://acrobatusers.com/tutorials/working-date-and-time-acrobat-javascript-part-3-3

 

Alternatively, if you're interested, I've developed a (paid-for) tool that will allow you to set up all of these calculations quite easily, and without having to write any code. You can find it here:

https://www.try67.com/tool/acrobat-calculate-time-differences-in-a-worksheet

 

LJL12Author
Participant
November 2, 2021

thank you - all these tutorials require a date function as well, which mine does not have, so they will not work in my scenario.