Show the current system date in Adobe Acrobat 7.0 Professional
Question:How do I show the current system date in field1 then add 7 days to that date and display it in field2?
Current Date: August 21, 2007 <– Field 1
Due Date: August 28, 2007 <– Field 2
Create the two fields and name them e.g. today and nextWeek.
For the “today” field, bring up properties, select the “General” tab and make the field read-only. Then select the Calculate tab and select “Custom calculation script” and click on “Edit…”
Add the following script to the edit box:
var today = util.printd(“mmmm dd, yyyy”, new Date());
event.value = today;
Save the new script and move to the “nextWeek” field. Set it to read-only, but this time use this script:
var d = new Date();
d.setDate(d.getDate() + 7);
var nextWeek = util.printd(“mmmm dd, yyyy”, d);
event.value = nextWeek;
Posted on October 20, 2008, in Web Dev and tagged Show the current system date in Adobe Acrobat 7.0 Profe. Bookmark the permalink. 1 Comment.