How to calculate DUE DATE in Adobe Acrobat with PDF Javascript

Published: 29 December 2022
on channel: SAR Solutions
2,114
23

In this video, I'm going to show you How you can calculate DUE DATE in PDF Form and PDF Document with PDF JavaScript. I'm using Adobe Acrobat Pro DC 2023.

First, we need to create two Javascript for calculating the due dates of a certain number of days and Months. I have shown every single step in the video, just follow as shown.
________________________________________________________________________
If you still facing any problems, Let me know in the comment box down below.

For more videos, Subscribe to our channel:    / @sarservices  
________________________________________________________________________

How to create a dependent Dropdown menu in adobe acrobat
   • How to create Multiple Dependent Drop...  

Create an auto-calculating PDF INVOICE in adobe acrobat
   • Create PDF Invoice With Auto calculat...  

How to add checkboxes and run Javascript in Adobe Acrobat
   • How to add checkbox and run Javascrip...  

________________________________________________________________________
JAVASCRIPT:

For Days:
var d = util.scand("dd/mm/yyyy", this.getField("Date").valueAsString);
var theTime = d.getTime () ;
var oneDay = theTime + 5*24*3600*1000;
var dd = new Date(oneDay);
event.value = util.printd("dd mmmm yyyy", dd);

For Months:
var d = util.scand("dd/mm/yyyy", this.getField("Date").valueAsString);
var cMonth = d.getMonth() + d.getFullYear() * 12;
d.setMonth(d.getMonth() + 1);
var diff = d.getMonth() + d.getFullYear() * 12 - cMonth;
if (diff != 1) {
d.setDate(0);
}
event.value = util.printd("dd mmmm yyyy", d);


On this page of the site you can watch the video online How to calculate DUE DATE in Adobe Acrobat with PDF Javascript with a duration of hours minute second in good quality, which was uploaded by the user SAR Solutions 29 December 2022, share the link with friends and acquaintances, this video has already been watched 2,114 times on youtube and it was liked by 23 viewers. Enjoy your viewing!