Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

Adding Time in LiveCycle (FormCalc)

Level 1
Level 1


Hoping that someone can help me with FormCalc code. I am a novice at LiveCycle and by no means a programmer. I am currently working on a form where several sets of START and END times (24hr clock) are entered - sometimes more than 10 sets.

The form is then supposed to calculate the difference between each set of times then give a total time.


START1: 14:00
END1:    14:30
TOTAL1:  0:30

START2:  14:45
END2:      15:35
TOTAL2:    0:50

START3:  15:40

END3:      15:55
TOTAL3:    0:35                    TOTAL TIME: 01:55



See the attached sample PDF form.

So far Ive been able to script the form to calculate the difference between START and END times in hours and minutes (24hr) in Formcalc without getting a negative result even when the END time is the next day by slightly tweaking a suggestion made in another thread on time-sheet calculations However, I am unable to add all the times together to give an accurate total time in HH:MM.

I searched extensively for examples of script for adding hours and minutes in Formcalc, but I haven't found anything thus far. I would be extremely grateful if anyone could point me in the right direction.

Is it possible to do this in Livecycle, that is add a set of time by referencing fields that were already scripted to calculate the difference between time?

Any assistance would be greatly appreciated.

Thanks in advance.

1 Reply
Level 2
Level 2


I can't help you but wondered if you can help me as you say you have part of a script that works.  All I need is the time difference between a start time and a finish time (ideally one that works overnight)

So start is 09:00 and finish is 16:00 the script gives answer 7:00 - if your script can do that could you share it with me?