1 Reply Latest reply on Nov 18, 2016 1:17 AM by emmad11800879

    Adding Time in LiveCycle (FormCalc)

    Alijay 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





      TOTAL TIME1:55

      See the attached sample PDF form. http://1drv.ms/1SzWYPX

      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 https://forums.adobe.com/message/3428679. 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. Re: Adding Time in LiveCycle (FormCalc)



          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?