Fix a PDF Dynamic Stamp Showing the Wrong Date
Question details
Fix a custom PDF dynamic stamp that fails to update the date and time upon application.

- Product
- PDF Editor
- Device & OS
- not provided
- Scenario
- Applying a custom dynamic stamp to a PDF document to log the current approval or review time.
- Observed behavior
- The applied stamp displays the date and time when the stamp file was originally created, rather than the actual date and time it is being applied to the document.
Before troubleshooting, ensure you have access to the original source file of your custom PDF stamp, as you will need to edit its internal form fields and scripts to correct the issue.
Edit the Stamp Source PDF Script
Correct the issue by ensuring the date field in the stamp's source file uses a dynamic calculation script rather than static text.
A stamp's scripts are designed to run exactly when the stamp is applied. However, if the date was added as static artwork or the form field lacks the proper calculation script, it will permanently preserve the creation date.
To fix this, you must modify the background source file of the stamp to include a dynamic JavaScript trigger.
Locate and open the specific source PDF file that houses your custom stamp in your PDF editor.
Navigate to the form preparation or editing mode to view the interactive fields within the stamp.
Ensure the area meant for the date is an actual text field. If it is static text, delete it and insert a new text form field.
Right-click the text field, open its Properties, and go to the Calculate tab. Choose 'Custom calculation script' and enter standard JavaScript to pull the current date (e.g., event.value = util.printd('mm/dd/yyyy', new Date());).
Save the source PDF file, restart your PDF application, and apply the stamp to a new document to verify the date updates correctly.

Recreate the Dynamic Stamp Using Default Templates
If editing scripts is too complex, recreating the stamp from an existing dynamic template ensures the coding is automatically correct.
Apply Accurate Date Stamps Instantly with WPS PDF
Avoid complex JavaScript coding and manual script editing by using WPS PDF's built-in dynamic stamps. WPS PDF automatically updates the current date and time when you apply a stamp, ensuring your documents are accurately time-stamped with zero configuration required.
- 1. Open your document: Launch WPS Office and open the PDF file you need to review or approve.
- 2. Navigate to the Comment tab: Click on the 'Comment' tab in the top ribbon to access the markup and annotation tools.
- 3. Select the Stamp tool: Click the 'Stamp' icon and choose from the 'Dynamic Stamps' category (such as 'Reviewed' or 'Approved').
- 4. Apply to the page: Click anywhere on your document to place the stamp. The current date and time will be automatically generated and embedded.

Frequently Asked Questions
Will a dynamic stamp update its date automatically every time I open the PDF?
No. A dynamic stamp's script runs only at the exact moment it is applied to the document. Once placed, the date and time become static to permanently record when the action occurred.
Why does my custom PDF stamp only show the time I created it?
This usually happens because the date was added as static text instead of a dynamic form field, or the form field lacks the necessary JavaScript in its calculation properties to pull the current system time upon application.
Can I format how the date appears in a dynamic stamp?
Yes. If you are using a custom calculation script, you can adjust the formatting string in the code (for example, changing 'mm/dd/yyyy' to 'dd-mmm-yyyy') to match your regional preferences.




