Skip to main content
October 4, 2019
Answered

Help !! Me !!!!! Copy and paste a date for another date field. (Acrobat Pro DC)

  • October 4, 2019
  • 4 replies
  • 1253 views

I think it's a very simple question,

but I'm a beginner who has already spent two days on this issue.

 

①The date listed in the date field "Day_A"
②Read it in the date field "Day_B", list it there, and
③Write in a date field "Day_C".

 

There is a little reason and I have to follow the above steps.
I have to write these code only in "Day_B".

Of course all of these are Date fields.

 

Field "Day_A" and  Field "Day_C" can not for use.

Field “Day_A”  →  Field “Day_B” is easy.
Field “Day_B” → Field “Day_C”   I don’t know how to write the code to write to .

 

===

★The field where the code is written is "Day_B".

 

//Get date field DayA.

//Revert to date object.

var GetDayA = this.getField("Day_A").value;
var DayA = new Date(GetDayA);

 

                        //No need this code..
                        //var GetDayB = this.getField("Day_B").value;
                        //var DayB = new Date(GetDayB);

 

//Write to DayB.

DayB = util.printd("yyyy-mm-dd",DayA);

 

//Use "event.value" method to write to this DayB field.
event.value = DayB;

 

★It is from here that I do not know.

 

var GetDayC = this.getField("Day_C").value;
var DayC = new Date(GetDayC);
DayC = util.printd("yyyy-mm-dd",DayA);

and ....????

 

★How can I apply the same effect as "event.value" for the "Day_B" field to "Day_C"?

★Again, event.value cannot be used because this code must be written to the same location.

 

Please help me !!

This topic is closed to new replies. Start a new post to keep the conversation going.
Correct answer JR Boulay

This great free tool may help you: Date Library for Adobe Acrobat 

4 replies

JR Boulay
Community Expert
JR BoulayCommunity ExpertCorrect answer
Community Expert
October 4, 2019

This great free tool may help you: Date Library for Adobe Acrobat 

Acrobate du PDF, InDesigner et Photoshopographe
October 7, 2019
Thank you !!! Very Nice !!!!
ls_rbls
Community Expert
Community Expert
October 4, 2019
Technical Generalist
October 7, 2019
Thank you !!!