Skip to main content
September 10, 2017
Question

Date from mm/dd/yyyyy to Date Custom dddd, mmm dd, yyyy

  • September 10, 2017
  • 5 replies
  • 4519 views

I would like to have DATE in mm/dd/yyyy from FIELD named as "DOS" to be displayed as DATE with custom format dddd, mmm dd, yyyy in another FIELD named as "DOS1".

I am really new in Adobe Acrobat 9 pro.

Thank you for your expertise.

This topic has been closed for replies.

5 replies

JR Boulay
Community Expert
Community Expert
March 2, 2023

Not an helpfull answer but think about it:

😉

 

Acrobate du PDF, InDesigner et Photoshopographe
rjablon
Known Participant
March 2, 2023

Understood! If only I could implement organization-wide...

ls_rbls
Community Expert
Community Expert
March 9, 2023

++Adding to the topic,

 

This is not a bug as pointed out by @try67 and also @JR Boulay is absolutely correct about employing the correct concept of ISO date standards.

 

The issue that you've observed happens with both the month and the day values depending on how they are interpolated in the date notation.


What is truly missing in this conversation is a small observation but with a more detailed, long and boring (yet important) clarification.

 

The date notation standards have been unique throughout history since the Old World versus the New World colonization. And the way that the date/time should be used with written formal papers, or expressed grammatically when publishing citations, to include military or International date/time standards accross the globe, have a reason and its purpose.

 

If you dig some more about why the US is the only country in the world that employs a date notation in which the month comes before the day , and more specifically with short date expressions (such as mm/dd/yy) that are accepted only by North Americans, you will see clearly why the Acrobat JavaScript core interpreter throw an alert to the user simply to point out an error with the date notation that is employed with that document.

 

For example, as opposite to the US , Europeans (and mostly every other country in the world, with the exception of some Asian nations that use ISO standard yyyy-mm-dd), are OK with dates that are expressed with the day before the month as the official date notation standard.

 

And if we take the same premise and apply it to how to use  short expression dates (such as "03/18/19") in a paper or a formal document, it would make it really hard for different users accross the world to understand what is the day, what is the month, and even the century that the publication (or PDF document in this case) is citing.

 

In other words, even though in the US it may be accepted (or considered OK) to cite a date informally, like for example "Fri, March 03, 2023" or "Friday, Mar 3, 2023", this doesn't necessarily means that it is also correct to turn an US short date into a long date notation format (like the one you are trying to force with your PDF): "Fri, 03/18/23"... specifically where the day of the week comes before the month, but the month is notated before the calendar day and expect every person in the world could (or should, or would) understand what exaclty is the date that you are trying to express.

 

In which case, if you use that format the short date notation is no longer short, but a long date notation format.


So, if you are going to do that, then (from the propper grammar standards in writing and formal date expressions standards) you may not abbreviate the day and the month; it has to be explicitely worded out like "Friday, March 04, 2023".

 

You will notice that if you express the date notation like "ddd, mmm/dd/yy" in Acrobat it will work. Nevertheless,  it is grammatically incorrect and much less the proper date notation standard.

 

If we break down further your desired current date notation, Note that you are citing an abbreviated day of the week "Fri" and immediately jump to the month number "mm/" notation, then jump back to the calendar day notation "dd/" and lastly the abbreviated year notation "yy" (dashes, periods, or slashes are irrelevant in this context).

 

With all that said, instead of using "ddd, mm/dd/yy" (where the month comes before the calendar day), you must interpolate the calendar day notation before the month number notation like shown in this long date notation: "ddd, dd/mm/yy" in order to make it acceptable as an informal date expression.

September 18, 2017

Example#1: If I enter 8/11/2017 and then it shows "Wednesday, Nov 08, 2017" which it should be "Friday, August 11, 2017"

Example#2: If I enter 12/25/2017 and then it gives me an error saying" Invaid date/time: please ensure that the date/time exists. Field[Field1] should match format dddd, mmm dd, yyyy"

My intention is to keep FIELD1 as mm/dd/yyyy and then FIELD2 as dddd, mmm dd, yyyy

Thank you again

Karl Heinz  Kremer
Community Expert
Community Expert
September 18, 2017

What format are you using for the first field? Is it actually set to mm/dd/yyyy?

September 18, 2017

Thank you for your advise. It worked and now I have another problem. If I change the Format of Date to Custom "dddd, mmm dd, yyyy" then month and day changes if the month of day numbers are less than 12 and if they are more than 12 then gives me error.

I appreciate the support and advises.

Thank you

September 16, 2017

Hi Karl,

Thank you for your response.

I do not know how to write a simple JavaScript in Acrobat 9 pro version.

I would like FIELD2 to read the value of Field 1 (Date, MM DD, YYYY)  and display it as custom format dddd, mmm dd, yyyy.

I will enter the value of FIELD 1 manually and then FIELD 2 will display it.

Example: I enter 9/16/2017 in FIELD 1 and then FIELD2 will display "Saturday, Sep 16, 2017".

Thank you again for your expertise

Inspiring
September 18, 2017

You need to use the custom JavaScript calculation to copy the value of FIELD1 to FIELD2  as well as having the field formats set appropriately.

For FIELD2 you need to use the following custom JavaScript calculation script:

event.value = this.getField("FIELD1").value;

Karl Heinz  Kremer
Community Expert
Community Expert
September 11, 2017

Open up the field properties dialog and go to the "Format" tab and select "Date", and in a second step pick the correct date format. If you cannot find the correct format, you can select Custom and then specify the format using the date format symbols (e.g. dddd or mm). You can see what the date would look like in the preview area.