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

How to solve "The Value entered does not match the format of the field xx"

New Here ,
Oct 04, 2024 Oct 04, 2024

Hi! 

I'm trying to calculate for time differences between two time stamps. I have both values (FeederPtMarkingStart and FeederPtMarkingStop) in time format. 

When I put in the simple calculation: "FeederPtMarkingStop-FeederPtMarkingStart" into my "Surgeon_MarkingTime_Feeder1" text box I get the error "The Value Entered does not match the format of the field [Surgeon_MarkingTime_Feeder1] error. 

Is anyone able to help me solve? Thank you! 

TOPICS
General troubleshooting , How to , PDF forms
361
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 04, 2024 Oct 04, 2024

You can't use a simplified field notation to find the different between 2 times unless some conversions are done.  What are the formats of the time stamp fields, the values, and what is the format of the Surgeon_MarkingTime_Feeder1 field?  Remove the formatting for the Surgeon_MarkingTime_Feeder1 field and see what the value is.

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

I set everything up for time value with HH:MM:ss as the format. 

Original test values were 08:30:00 and 09:00:00. 

The original format of Surgeon_MarkingTime_Feeder1 was HH:MM:ss as well but when I removed it and tried to solve with no format it told me "NaN."

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

You are using the simplified field notation of subtraction.  It only works with 2 numbers.  08:30:00 is not a number (which is what NaN stands for).  You can't subtract time this way.  There are lots of answers on here about how to get the difference between two different times.  You're going to have to use a custom calculation 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 ,
Oct 04, 2024 Oct 04, 2024
LATEST

So here's an article that covers the error you are getting:

https://www.pdfscripting.com/public/Value-Entered-Does-Not-Match-Format.cfm

 

However, as PDFAS states, dates are not like numbers.  Simple calculations do not work. 

Here are some articles about time:

https://www.pdfscripting.com/public/Date-and-Time-Handling.cfm

https://acrobatusers.com/tutorials/date_time_part1/

https://acrobatusers.com/tutorials/date_time_part2/

 

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

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