Answered
Hi there, hoping someone can help. I am trying to add a text field to a document that displays a simple message:
Printed on DD/MM/YYYY. Expires on DD/MM/YYYY.
Where the expiry date is 7 days after the current date. I am attempting to use a document-level javascript. My code is as follows to print the current date:
var f = this.getField("Today");
f.value = "Printed on " + util.printd("mm/dd/yyyy", new Date()) + ". This document expires in 7 days.";
Rather than printing "This document expires in 7 days.", I'd like to print something as above, "Expires on DD/MM/YYYY", which would be 7 days after the current date. I keep trying different methods and ending up with errors.
Any help with the code would be greatly appreciated.
Thanks,
Dan
- AcrobatUsers Community Expert - Contact me personally at try6767 [at] gmail [dot] com
Check out my custom-made scripts website: http://try67.blogspot.com