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.
URL: http://forums.planetpdf.com/forum_posts.asp?TID=2078
Printed Date: 25 Apr 2019 at 1:00pm
Software Version: Web Wiz Forums 11.10 - http://www.webwizforums.com


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?



-------------
Marc



Replies:
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

-------------
Marc



Print Page | Close Window

Forum Software by Web Wiz Forums® version 11.10 - http://www.webwizforums.com
Copyright ©2001-2017 Web Wiz Ltd. - https://www.webwiz.net