Skip to main content
Participating Frequently
September 5, 2023
Question

Calculating future dates from data contained in multiple fields

  • September 5, 2023
  • 1 reply
  • 1621 views

How do I write a script to calculate a future date based on the product of 2 separate fields?

For example, Field1 represents a starting date (1/1/2023), Field2 represents (76days) from the starting date.

This topic has been closed for replies.

1 reply

Thom Parker
Community Expert
Community Expert
September 5, 2023

Is Field2 always 76 days from the starting date?

 

This question has been asked many times:

https://community.adobe.com/t5/forums/searchpage/tab/message?q=add%20days%20to%20date&noSynonym=false&collapse_discussion=true

 

Thom Parker - Software Developer at PDFScriptingUse the Acrobat JavaScript Reference early and often
Participating Frequently
September 5, 2023

No, the 76 is not a fixed number.

That number will vary depending on user entries.

Thom Parker
Community Expert
Community Expert
September 5, 2023

Ok, so Field1 is the starting date in "mm/dd/yyyy" format. 

How is the number of days determined?  Is it entered in Field2?

What is the field that recieves the final calculated date?

 

Details are important. 

 

 

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