Could one of you clever people help me figure out how to calculate time in this format for one of my forms. The goal is to determine how time was spent during the work day and then add up the hours. For example, Mary spent 3 hours, 30 mins on sales calls (entered as 3.3 form field 1), then 2 hours 30 mins driving (entered 2.3 form field2) and so on. The total time she spent working needs to add up to 6 in hours, not 5.6. Thank you kindly for your suggestions.
Have you made a decision about your time format?
You example is a bit confusing. If you want to enter hours and decimal fractions of an hour, then 3 hours and 30 minutes would be, so 3 hours and 30 minutes would be entered as 3:30.
Will you be using one of the time formats provided by Acrobat?
I tried both time and number. Since "time" format doesn't do calculations, I'm not sure how to add this up. If I use the "number" as my format, it doesn't add up time, as in minutes, rather just as a .3. +.3 equals.60 not 1 hour. Does that help?
If you are going to use number and decimal fractions of an hour then you need to convert minutes to hours. 15 minutes is 1/4 or 0.25 of an hour. 1 minute is 1/60 of an hour or 0.0167 hours.
Time can be computed. but you can not just add hours and minutes together, you need to convert either the hours to minutes minutes to hours, perform the addition, and then convert either the hours or minutes back to the hours and minutes format.
You still need to explain how you want the time time data entered into the form.
I am trying to prevent the end user from having to calculate or convert minutes. So for example I'd like the decimal to represent minutes.
hours spent driving: 3.25 (3hours 25 minutes), or time spend researching 3.12 (3 hours 12 minutes). The end user would enter:
3.25 and 3.12 ( my form would then calculate the total hours to be 6.37 (meaning 6 hours 37 minutes).
Hope that helps, thank you for your patience and assistance.
I know this is possible, as the person asking for this form, has several others that calculate this way, we are just trying to replicate it for a new form, and I don't have access to the person who created the original to ask ;(
OK. You want to enter the time with a decimal but not as tenths of an hour. Too much coding for custom keystroke, format, and validation.
You can can use the HH:mm format for the 24 hour time format and that would let one enter up to 23:59 or 23 hours and 59 minutes.