Skip to main content
Participating Frequently
October 29, 2020
Answered

Current Date and Time

  • October 29, 2020
  • 1 reply
  • 2305 views

I have been using 

event.value = util.printd('m/d/yyyy h:MM tt', new Date());

to display the date and time printed on my documents. It used to work displaying the current date and time but now it does not update but prints the date and time created.

This topic has been closed for replies.
Correct answer try67

Printing the file will not trigger this code. You should move it to the Will Print event of the document, or add a call there to the calculateNow method.

1 reply

Bernd Alheit
Community Expert
Community Expert
October 29, 2020

Where does you use the script?

Participating Frequently
October 29, 2020

In scanned document  - prepare forms, image field, date and time. Formula added to the calculate field.

try67
Community Expert
try67Community ExpertCorrect answer
Community Expert
October 29, 2020

Printing the file will not trigger this code. You should move it to the Will Print event of the document, or add a call there to the calculateNow method.