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 . Bookmark the permalink. 1 Comment.

  1. How do I bring up “properties” for the date/time field? Or am I using the wrong type of field?

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: