Answered
I am trying to set up a form with 3 tex boxes, text box one is the current date, text box 2 is a number of days and text box 3 is the calculatio of the previous 2 in other words I want to add days to a date
I am trying to set up a form with 3 tex boxes, text box one is the current date, text box 2 is a number of days and text box 3 is the calculatio of the previous 2 in other words I want to add days to a date
// add days to current date and set value of this field// get current date time objectvar oNow = new Date();// get the number of days to add to the current datevar fAddDays = this.getField('Field2Name').value;// add fAddDays to current date's object dateoNow.setDate(oNow.getDate() + Number(fAddDays) );// set field value to current date plus number of days formattedevent.value = util.printd('mmm d, yyyy', oNow);
http://www.acrobatusers.com/tutorials/2006/date_time_part1
You'll find more detailed information on calculations and on Date and time handling at
http://www.pdfscripting.com
Thom Parker
The source for PDF Scripting Info
[url=http://www.pdfScripting.com]pdfscripting.com[/url]
The Acrobat JavaScript Reference, Use it Early and Often
[url=http://www.adobe.com/devnet/acrobat/javascript.php]http://www.adobe.com/devnet/acrobat/javascript.php[/url]
Then most important JavaScript Development tool in Acrobat
[url=http://www.acrobatusers.com/tutorials/2006/javascript_console][b]The Console Window[/b][/url]
Thom Parker
The source for PDF Scripting Info
www.pdfscripting.com
Very Important - How to Debug Your Script