Highlighted

Date formatting question

Contributor ,
Jul 02, 2020

Copy link to clipboard

Copied

I have a text field (named 'Date') with the format set as mmmm d,yyyy (eg. July 2, 2020).  I would like to add another text field for the date to autopopulate when filled in BUT it would have to formatted as mm/dd/yy (eg. 07/02/20).  Basically, I want the user to see July 2, 2020 when they fill in the date but I need 07/02/2020 to populate to another text field.  Is this even possible??

Oh my gawd!!!!!   I did it!!!!!  I just forgot to remove the date formatting on Date 2, woot!!!!

Topics

General troubleshooting, How to, PDF forms

Views

56

Likes

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

Date formatting question

Contributor ,
Jul 02, 2020

Copy link to clipboard

Copied

I have a text field (named 'Date') with the format set as mmmm d,yyyy (eg. July 2, 2020).  I would like to add another text field for the date to autopopulate when filled in BUT it would have to formatted as mm/dd/yy (eg. 07/02/20).  Basically, I want the user to see July 2, 2020 when they fill in the date but I need 07/02/2020 to populate to another text field.  Is this even possible??

Oh my gawd!!!!!   I did it!!!!!  I just forgot to remove the date formatting on Date 2, woot!!!!

Topics

General troubleshooting, How to, PDF forms

Views

57

Likes

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
Contributor ,
Jul 02, 2020

Copy link to clipboard

Copied

I named one text field 'Date1' and another 'Date2', added the following custom calculation script in 'Date2' text field.  It doens't work but I feel like I'm close.  Any help would be really appreciated.

var s1 = this.getField("Date1").valueAsString;

if (s1=="") event.value = "";

else {

var d1 = util.scand("mmmm d,yyyy", s1);

event.value = util.printd("mm/dd/yy", d1);

}

 

 

Likes

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
Reply
Loading...
Contributor ,
Jul 02, 2020

Copy link to clipboard

Copied

Oh my gawd!!!!!   I did it!!!!!  I just forgot to remove the date formatting on Date 2, woot!!!!

Likes

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
Reply
Loading...
Resources
One Stop Solution for Acrobat
Edit a PDF