Copy link to clipboard
Copied
I created a a 14-page form in Acrobat Pro DC with several fields performing calculations predicated on a user-defined date field. Everything works great when I test it in Acrobat Pro DC. However, the calculation for one field does not function when I open the file in Acrobat Reader DC. Is there some step I need to take that allows this to function?
Where have you defined the function TimeDateDiff ?
Copy link to clipboard
Copied
What calculation does you use?
Copy link to clipboard
Copied
Here's the custom calculation script I used:
var strStartDate = this.getField("StartDate").valueAsString; if(strStartDate != "") { var nDays = TimeDateDiff(strStartDate, "June 2, 2023", "mmm dd, yyyy", 4); event.value = nDays * 32.647; } else event.value = 0;
Again, it works when I test it within Acrobat Pro DC but fails to function in Acrobat Reader DC
Copy link to clipboard
Copied
Where have you defined the function TimeDateDiff ?
Copy link to clipboard
Copied
I figured it out. For whatever reason, it was able to calculate. I added the the definition and it now works. Thanks for your help!