I have been working on a PDF form which has a "time in" field, "time out" field, "total time" and "accumulated time" fields. I have found a couple of forms online which I tried copying the code and it will not work. There is a formula here that they go by, i.e. 0-3 minutes = 0, 4-9 minutes + .1.
I found code for the conversion but am a beginner at writing code and I am getting errors in the scripting box which I don't understand.
Does anyone have code written that would work for the Total Time field that will calculate the time between the in and out fields and convert to a set formula? I can get the accumulated field to work.
I used this:
document.write(Math.round(0.60) + "1.0");
document.write(Math.floor(0.57) + "0.90");
document.write(Math.floor(0.51) + "0.80");
document.write(Math.floor(0.45) + "0.70");
document.write(Math.floor(0.39) + "0.60");
document.write(Math.floor(0.33) + "0.50");
document.write(Math.floor(0.27) + "0.40");
document.write(Math.floor(0.21) + "0.30");
document.write(Math.floor(0.15) + "0.20");
document.write(Math.floor(0.09) + "0.10");
document.write(Math.floor(0.03) + "0.00");
but do not know how to make it work in the script. I am sure I am missing code before and after? The version I am working on is 9.4.6 but is not in the drop down box below.
Annette
I hope this can help :
- http://acrobatusers.com/forums/aucbb/viewtopic.php?id=27580
- http://acrobatusers.com/tutorials/2006/date_time_part1
abracadabraPDF.net