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

Calculate military time to also include lunch and possible overnight shift

New Here ,
Apr 20, 2021 Apr 20, 2021

I am creating a time sheet and need help with writing a script. The script needs to have a start time and an end time. It needs to also include  a lunch time. There will also be instances where the time could start on one day and go over into the next day. 

TOPICS
How to , JavaScript
611
Translate
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
Adobe Employee ,
Apr 20, 2021 Apr 20, 2021

Hi Tracy

 

Hope you are doing well and sorry for the trouble. As described you need help with a script.

 

Please check out the help page: https://www.adobe.com/content/dam/acom/en/devnet/acrobat/pdfs/js_developer_guide.pdf and see if that helps.

 

Regards

Amal

Translate
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
New Here ,
Apr 20, 2021 Apr 20, 2021

Amal, I only found one page (91) that talks about calculating. I need more direction than what it has. 

Translate
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 ,
Apr 21, 2021 Apr 21, 2021
LATEST

Performing date and time calculations in Acrobat JS is not a trivial task.

See these tutorials for more info:

https://acrobatusers.com/tutorials/working-with-date-and-time-in-acrobat-javascript

https://acrobatusers.com/tutorials/working-with-date-and-time-in-acrobat-javascript-part-2

https://acrobatusers.com/tutorials/working-date-and-time-acrobat-javascript-part-3-3

 

If you're interested, I've developed a (paid-for) tool that allows you to do something very similar to what you described, without having to write any code, and I can customize it to your specific needs. You can find it here:

https://www.try67.com/tool/acrobat-calculate-time-differences-in-a-worksheet

 

Translate
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