Print Page | Close Window

Deducting time - Livecycle ES2

Printed From: Foxit's Planet PDF Forum
Category: Lets Talk PDF
Forum Name: JavaScript
Forum Description: Discussions relating to the use of JavaScript within PDF.
Printed Date: 17 Oct 2019 at 3:50am
Software Version: Web Wiz Forums 11.10 -

Topic: Deducting time - Livecycle ES2
Posted By: Marcidee
Subject: Deducting time - Livecycle ES2
Date Posted: 17 Nov 2016 at 2:02pm

I need to deduct time from two cells - ie cell one (called DateTimeField1) is 16:30 and cell two (DateTimeField2) is 18:00 the answer in cell 3 (NumericField1) should be 1:30


Time could go over night - so I need a script that will allow for this (ie start time 21:00 - finish time 07:00 = 10:00

I am a beginner with javascript  

can anyone help please?


Posted By: gkaiseril
Date Posted: 25 Nov 2016 at 4:16pm
LiveCycle has functions in FormCalc that can convert data in time formats to minutes (Time2Num), use this to get the minutes. Do the computation in minutes and then use the function Num2Time to format the minutes into (days), hours, minutes, seconds, milliseconds.

FormCalc documentation is part of the Help in LiveCycle.

Posted By: Marcidee
Date Posted: 25 Nov 2016 at 4:40pm
Thank you for your help


Print Page | Close Window

Forum Software by Web Wiz Forums® version 11.10 -
Copyright ©2001-2017 Web Wiz Ltd. -