# Forms

Currently Being Moderated

## Adding Time for Work Tracking

### May 13, 2012 7:52 AM

Tags:

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.

Replies
• Currently Being Moderated
May 13, 2012 8:07 AM   in reply to LoneAcorn

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?

|
Mark as:
• Currently Being Moderated
May 13, 2012 9:25 AM   in reply to LoneAcorn

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.

|
Mark as:
• Currently Being Moderated
May 13, 2012 5:00 PM   in reply to LoneAcorn

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.

Sample Timesheet with Total as Decimal Hours and Hours and Minutes

|
Mark as:
Actions

#### More Like This

• Retrieving data ...

#### Answers + Points = Status

• 10 points awarded for Correct Answers