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

Date formatting question

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

TOPICS
General troubleshooting , How to , PDF forms

Views

382

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

Engaged , Jul 02, 2020 Jul 02, 2020

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

Votes

Translate

Translate
Engaged ,
Jul 02, 2020 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);

}

 

 

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

Copy link to clipboard

Copied

LATEST

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

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