• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Create Custom Dynamic Stamp with Future Date

New Here ,
Aug 12, 2022 Aug 12, 2022

Copy link to clipboard

Copied

Hello,

 

I am trying to create a custom dynamic stamp that posts a future date. For example, when I open my custom stamp on a document I want the date to display 9 days later. I have followed the tutorial on how to create a custom dynamic stamp, but I am unable to find javascript that will work to output a future date.  I have tried looking online for future date javascript that should theoretically work, but it doesn't work in my stamp or just even when I play around with form fields. Can someone please help?

 

The current date script I have is:

event.value = (new Date()).toString();
AFDate_FormatEx("mmm dd, yyyy");

 

Thank you,

 

Lynnette

TOPICS
JavaScript

Views

681

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Community Expert , Aug 12, 2022 Aug 12, 2022

Try this:

var d1 = util.scand("mmm dd, yyyy",new Date());
d1.setDate(d1.getDate() +9);
event.value = util.printd("mmm dd, yyyy", d1);

Votes

Translate

Translate
Community Expert ,
Aug 12, 2022 Aug 12, 2022

Copy link to clipboard

Copied

Try this:

var d1 = util.scand("mmm dd, yyyy",new Date());
d1.setDate(d1.getDate() +9);
event.value = util.printd("mmm dd, yyyy", d1);

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Aug 12, 2022 Aug 12, 2022

Copy link to clipboard

Copied

LATEST

That's great! Yes, thank you so much. It worked!

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines