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

Date and Time form field time is incorrect

Explorer ,
Sep 25, 2018 Sep 25, 2018

Any suggestions please.....

I have inserted a date/time field into my form using Adobe Creative Cloud/Adobe Acrobat Pro DC and when I create the field it shows the right time but when I go into the form and select today's date the shows the date correctly but the time remains at 8.22am regardless of what the time actually is....I waited several hours and tried again and the time on the form still remains as 8.22am - see below

many thanks

Heather

Form_DateTime.png

TOPICS
PDF forms
4.7K
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 ,
Sep 26, 2018 Sep 26, 2018

If you want to update the field's value when you click it use this code as its OnFocus script:

event.target.value = util.printd("m/d/yyyy h:MM tt", new Date());

View solution in original post

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 ,
Sep 26, 2018 Sep 26, 2018
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
LEGEND ,
Sep 26, 2018 Sep 26, 2018

Your format assumes both date and time as entry values, using the date picker only modifies the date, to update the time one needs to go back and edit the time or manually enter both the date and time. You could use a script to automatically change the time to the system's time but this would prevent the full manual entry of the date time.

If you need to update both the date and time, I would use 2 separate fields, one the date and one for the time, and then either create a field of the combined values or combine the values in a script.

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 ,
Sep 26, 2018 Sep 26, 2018

You must enter the time with the keyboard.

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 ,
Sep 26, 2018 Sep 26, 2018

It's just an example, it's not the actual value of the field.

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 ,
Sep 26, 2018 Sep 26, 2018

If you want to update the field's value when you click it use this code as its OnFocus script:

event.target.value = util.printd("m/d/yyyy h:MM tt", new 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
Explorer ,
Sep 26, 2018 Sep 26, 2018

Thanks - tried this but still can't get it to work

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 ,
Sep 27, 2018 Sep 27, 2018

You'll need to provide more details if you want further 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
Explorer ,
Sep 27, 2018 Sep 27, 2018
LATEST

Excellent news!!!!...I now have it working Gilad - thank you for your help

cheers

Heather

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