These forums are now Read Only. If you have an Acrobat question, ask questions and get help from one of our experts.

SIMPLE DATE AND TIME FIELD

ray-ray
Registered: Jun 12 2009
Posts: 3

can some kind person please tell me how to get the current date and time to automatically populate into a text field upon the Submission of a form that was distributed through Acrobat??? It would be great if this would only populate upon submission of the form......but if that's not possible, I would still like to know how to get date/time to auto populate upon the opening of the document...

Thank you!!

My Product Information:
Acrobat Pro 9.0, Windows
try67
Online
Expert
Registered: Oct 30 2008
Posts: 2399
You need to use JavaScript's Date object.
If you just create a new Date object ( like so: new Date(); ) it will contain the date/time of the moment it was created. You can then format it nicely using util.printd() .

- AcrobatUsers Community Expert - Contact me personally at try6767 [at] gmail [dot] com
Check out my custom-made scripts website: http://try67.blogspot.com

gkaiseril
Expert
Registered: Feb 23 2006
Posts: 4308
See Thom Parker's tutotrials:

[url=http://www.acrobatusers.com/tutorials/2006/date_time_part1]Working with date and time in Acrobat JavaScript (Part 1 of 3)[/url]
[url=http://www.acrobatusers.com/tutorials/2006/date_time_part2/]Working with date and time in Acrobat JavaScript (part 2 of 3)[/url]
[url=http://www.acrobatusers.com/tutorials/working-date-and-time-acrobat-javascript-part-3-3]Working with date and time in Acrobat JavaScript (part 3 of 3)[/url]

For examples on how to get and perform date and time calculations.

George Kaiser