Skip to main content
Participant
May 16, 2025
Answered

Date Automatically updated

  • May 16, 2025
  • 2 replies
  • 819 views

I want to add a date in the PDF so that it can be automatically updated to the date of that day every time it is opened

Can anyone help? I have tried many times per the comment from the community, but it didn't work.

I may need detailed steps. 

 

 

 

 

Correct answer PDF Automation Station

Create a field called "Today" and enter the following document level script:

this.getField("Today").value=util.printd("mm/dd/yyyy", new Date());

2 replies

Participant
September 3, 2025

I was trying to use the code mentioned ot make a received stamp in adobe, I wanted it to auto advance each day...  Only trouble is, not when I try adn use it, it defaults to sep 11 2025 ?  not sure why it would do that?

 

PDF Automation Station
Community Expert
Community Expert
September 3, 2025

Please post your script.

PDF Automation Station
Community Expert
Community Expert
May 16, 2025

Create a field called "Today" and enter the following document level script:

this.getField("Today").value=util.printd("mm/dd/yyyy", new Date());

huan_8039Author
Participant
May 16, 2025

Thank you. I added a text box, and the date has been shown correctly.

I have another question. I don't want the bodors and filled color of the text box shown. 

I try to change to NO COLOR, it seems fail to change. It still show a light blue background color.

Bernd Alheit
Community Expert
Community Expert
May 16, 2025

Set the field as read-only.