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

Time format validation

New Here ,
Mar 12, 2023 Mar 12, 2023

Copy link to clipboard

Copied

HI,

 

I have a form that asks for a time. the format is set to time and HH:MM. There is not validation for the field. whenever you enter any time in the 02:00 hour I get a format issue message. It is in the correct format and its only the 02:00 hour.

"The value entered does not match the format of the field "

TOPICS
PDF forms

Views

806

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
Community Expert ,
Mar 12, 2023 Mar 12, 2023

Copy link to clipboard

Copied

Can you share the file?

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
Community Expert ,
Mar 13, 2023 Mar 13, 2023

Copy link to clipboard

Copied

By selecting a field format, you are also selecting format validation. But the reported error may not be on the field where the time is entered. Is this field used in any calculations?

 

Thom Parker - Software Developer at PDFScripting
Use the Acrobat JavaScript Reference early and often

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
Community Expert ,
Mar 13, 2023 Mar 13, 2023

Copy link to clipboard

Copied

LATEST

EDITED REPLY, fixes typos

 

++Adding to the discussion,

 

As mentioned by @Thom Parker , you've already assigned a validation.

 

By choosing the HH:MM time notation (all in upper case), you are instructing Acrobat to notate the output in military time format, also known as the 24 hour clock.

 

In which case, a value of 0200 is read as "zero two hundred hours" (not two hundred hours or 2 am (if using a 12-hour clock).

 

The issue is that with a 24-hour clock the colon ":" symbol is not needed, but for some reason every computer program or system clock have always included the colon to visually aid the users in identifying what are the hours from the minutes.

 

See if the error only pops up due to the user typying in "200" or "0200" instead of the full built-in format as "02:00" (with the colon symbol included).

 

Even if you customize the time notation as "HHMM" (which is actually the proper way to express military time), the Acrobat JavaScript core interpreter will expect to see the colon symbol between hours and minutes notations.

 

That said, because it is a 24-hour clock, 02:00 ( zero two hundred hours) is understood to be 2 am in the morning, while 14:00 (or forteen hundred hours) means 2 pm in the afternoon respectively.

 

 

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