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

Multiple date fields but with different formats

Community Beginner ,
Nov 23, 2019 Nov 23, 2019

Hello all.

I'm a beginner and I'm creating a fillable form. I don't know whether this is possible, but I'm thinking it probably somehow should be:

I've created a drop-down calendar field, named it "Date" and set its format as dddd d mmmm yyyy ("Sunday 24 November 2019").

I've then copied that field twice more further down the document and kept the field name the same, so what's chosen in the first field flows through to the copied-down "Date" fields. So far, so good.

However, I want the format of the second field to be d mmmm yyyy ("24 November 2019"); and the third one to be in the format of dddd ("Sunday"), without having to have three different points to enter the date, just the top one. Is that possible?

TOPICS
PDF forms
3.6K
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
1 ACCEPTED SOLUTION
Community Expert ,
Nov 24, 2019 Nov 24, 2019
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
Community Expert ,
Nov 24, 2019 Nov 24, 2019

Hi,

 

On each of the copied fields you need to open properties, and select the format tab, then date, then custom; then   type in the format that you want for that field.

 

If this method doesn't work, you will need to change the name for each of the additional date fields that you distributed accross your PDF document and add a little bit of java scripting as a custom calcation script. 

 

The scrupt will allow you to get the string value of the original date field and be able to convert it to the desired format.

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
Community Beginner ,
Nov 24, 2019 Nov 24, 2019

Thanks very much for the reply. I've done the custom format thing as you described in your first sentence, but if I change one, they all change to that same format. What I want is: the same info in each field (the date), distributing from the first entry to the other two, but formatted differently in each field -

First field: dddd d mmmm yyyy ("Sunday 24 November 2019")

Second field: d mmmm yyyy ("24 November 2019")

Third field: dddd ("Sunday")

...without having to resort to entering the date into each of multiple separate date fields, each with a different name and format - which would certainly get me the result I want, but I don't want to be entering the date in each one of multiple fields (I've pared my problem down to just 3 fields for my post, but in reality there'll probably be at least a half dozen per document, multiplied by at least 27 documents).

 

Your last sentence interests me. Are you able to help with the java scripting?

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
Community Expert ,
Nov 24, 2019 Nov 24, 2019
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
Community Beginner ,
Nov 24, 2019 Nov 24, 2019

Yes! That worked: changed the names of the additional date fields, then added a tweaked version of that second script (the valueAsString one) into the custom calculation script box of each date field, and VOILA!

 

Thank you very very much for your help!

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
Community Expert ,
Nov 24, 2019 Nov 24, 2019
LATEST

You're welcome. I'm glad that it helped.

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