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

Adobe Acrobat Forms Date format

New Here ,
Oct 17, 2024 Oct 17, 2024

I could not find any previous posts about this:  I have created a pdf form and I need the day date and time on an entry line.  Using DatePickerwWhen formatted as "m/d/yyyy" it comes out okay BUT when I custom format to: "ddd, m/d/yyyy hh:mm tt" it changes the date format to d/m/yyyy. So my entry of Fri, 9/6/2024 10:25 am turns out to be Sun, 6/9/2024 10:25 am. 

 

Does anyone have a fix for this?  I started and completed this indepth form on 10/10 so I never saw this error until it went live yesterday. 

I have tried restarting Acrobat, I have tried using another PCs with another version of Acrobat, I have created new forms from scratch.  PC date format is standard  ... I am at a loss. 

Any advice is greatly appreciated. 

FormError.png

TOPICS
General troubleshooting , Modern Acrobat , PDF , PDF forms
1.3K
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 ,
Oct 17, 2024 Oct 17, 2024

Are you trying to use the date picker for the current time of the date selected, or do you just need the date keyed in the format described?  BTW, mm needs to capitalized in the format (MM=minutes, mm=months).

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
New Here ,
Oct 17, 2024 Oct 17, 2024

I am using the date picker for going back in time and chosing the day and then manually adjusting the time.  This is for an audit form that needs to list the day of the week and time of day a service was preformed to ensure compliance.  

My bad on the MM/mm thing in my haste I mistyped it.  Thank you

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 ,
Oct 17, 2024 Oct 17, 2024

I don't think you can use a date/time format for the date picker.  I developed a date-picker tool long before Adobe added this feature to date format fields.  I just tested it.  You can use the date format of m/d/yyyy and modify the code in the button to achieve, for example,  Thu, 10/17,2024 00:00 am.  The date and day will always be correct but the time will always be 00:00 am.  You can manually adjust the time because the file is not formatted for a date.  The date feeds into the unformatted text field from the popup date picker button.  The tool can be purchased here if you are interested, and I will show you how to modify the button code.

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
New Here ,
Oct 18, 2024 Oct 18, 2024

Thanks, I will look into it.  My current work around is Word 😕

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 ,
Oct 18, 2024 Oct 18, 2024
LATEST

I have a solution for you.

  1.  Remove the formatting from your field.
  2. Enter the following Mouse Down script in the field:
event.target.setAction('Format','AFDate_FormatEx("m/d/yyyy")');
event.target.setAction('Keystroke','AFDate_KeystrokeEx("m/d/yyyy")');

 3.  Enter the following custom calculation script in the field:

if(event.value)
{
var date=util.scand("m/d/yyyy", event.value);
event.target.setAction("Format","");
event.target.setAction("Keystroke","");
event.value=util.printd("ddd, m/d/yyyy HH:MM tt", date)
}

This will allow the calendar widget.  Once the date is selected it will return the date in the format you desire with 00:00 am as the time.  You will be able to edit the time in the field, or reactivate the calendar widget and select another date.

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