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

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

New Here ,
Oct 04, 2024 Oct 04, 2024

Copy link to clipboard

Copied

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

Views

175

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

Copy link to clipboard

Copied

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.

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

Copy link to clipboard

Copied

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."

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

Copy link to clipboard

Copied

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.

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

Copy link to clipboard

Copied

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

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