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!
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.
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."
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.
Copy link to clipboard
Copied
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/