These forums are now Read Only. If you have an Acrobat question, ask questions and get help from one of our experts.

Custom calculation script

kowol
Registered: Sep 30 2009
Posts: 2

Hello,

I have a form field that I want to calculate the work hours based on time they entered.
The formular in Excel is like =(E11-B11+(E11

try67
Expert
Registered: Oct 30 2008
Posts: 2399
Yes, but you'll need a custom script.

- AcrobatUsers Community Expert - Contact me personally at try6767 [at] gmail [dot] com
Check out my custom-made scripts website: http://try67.blogspot.com

suewhitehead
Registered: Jun 3 2008
Posts: 232
Scripting in Acrobat forms is done in Javascript which is different from MS Office. To do scripting of dates and time is not the simplest thing. Search the LEARNING CENTER for a tutorial named Working with date and time in Acrobat JavaScript by Thom Parker if you want to learn how to do this.
gkaiseril
Expert
Registered: Feb 23 2006
Posts: 4308
As noted you will need to write a custom JavaScript calculation using the JavaScript date object, see Thom Parker's [url=http://www.acrobatusers.com/tutorials/2006/date_time_part1]Working with Date and Time in Acrobat JavaScirpt[/url].

Since this is a timesheet and there will many repetitions of this calculation with different values, you should consider using a document level function that is passed the values needed for the calculation and returns the result of the computation.

George Kaiser