• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Calculate Duration

New Here ,
May 29, 2019 May 29, 2019

Copy link to clipboard

Copied

Hi

I am having a pdf form that includes three cells:

start Time

end Time

Duration

The user will enter the start time and end time in HH:MM and the file will calculate the duration In HH:MM

I want your help in building a JavaScript code because I need the file but my skills are basic in JavaScrip. Name of the cells are same as mentioned on the top.

Thanks in advance.

TOPICS
Acrobat SDK and JavaScript

Views

289

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
May 29, 2019 May 29, 2019

Copy link to clipboard

Copied

LATEST

You can start by reading these articles on the Date object, which is what you'll need for calculating duration.

https://acrobatusers.com/tutorials/date_time_part1

https://acrobatusers.com/tutorials/date_time_part2

The example in the second article shows how to calculate the time between two times.

Thom Parker - Software Developer at PDFScripting
Use the Acrobat JavaScript Reference early and often

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines