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

Another JavaScript Date & Time Problem

RKF
Registered: Jul 13 2009
Posts: 20
Answered

Good Morning All -

I spend most of yesterday trying to create a script that will allow form users to input departure and arrival times. I need to track travel compensation time. Input format needs to be time. Users will input departure, arrival, and meal times. I have attempted to write a script that will subtract the arrival and meal times from departure time with no avail. My form fields are as follows: Start Time, Arrival Time, Meals/Breaks, and total CTT hours.

Any help would be MUCH appreciated!

My Product Information:
Acrobat Standard 9.1.1, Windows
gkaiseril
Online
Expert
Registered: Feb 23 2006
Posts: 4307
Have you looked at Thom Parker's tutorial series on [url=http://www.acrobatusers.com/tutorials/2006/date_time_part1]Working with date and time in Acrobat JavaScript[/url]?

Because the time periods can start and end on different dates, you will need to factor in the date in the calculations.

In the Standard version of Acrobat 9, you are restricted to using AcroForms and the JavaScript date object which requires a provided date for time computations.

George Kaiser