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

Date Formula

New Here ,
Sep 06, 2024 Sep 06, 2024

Hi all,

 

Hope someone can help. Is it possible to have a formula that adds only the next month from the field before.

 

I need date2 to show 05-Nov-2024

date3 to show 05-Nov-2024

date4 to show 05-Dec-2024

date5 to show 05-Jan-2025

 

So the year would also need to update when a new one is reached.

 

Is this possible?

 

Cheers

Chris

TOPICS
Acrobat SDK and JavaScript
340
Translate
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 , Sep 06, 2024 Sep 06, 2024

Hi,

In validation script of your "Date1" field you write:

var oDate=util.scand("dd-mmmm-yyyy",event.value);
for (var i=2; i<=12; i++) {
	oDate.setMonth(oDate.getMonth()+1);
	this.getField("Date"+i).value=util.printd("dd-mmmm-yyyy",oDate);
}

@+

Translate
Community Expert ,
Sep 06, 2024 Sep 06, 2024

Hi,

In validation script of your "Date1" field you write:

var oDate=util.scand("dd-mmmm-yyyy",event.value);
for (var i=2; i<=12; i++) {
	oDate.setMonth(oDate.getMonth()+1);
	this.getField("Date"+i).value=util.printd("dd-mmmm-yyyy",oDate);
}

@+

Translate
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 ,
Sep 06, 2024 Sep 06, 2024
LATEST

Thanks you so much

Translate
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