frizzell
asked on
Acrobat 7: LiveCycle Designer- Calculating Hours From Two Time Fields
I am designing a form for scheduling employees that has two fields, 'In', and 'Out'. A third field is used to calculate the difference in hours(example: 1.75 hours). I am having trouble getting the calculation to return hours instead of a pure number. When 'In'= 11:30 and 'Out'=12:30, for example, the difference is shown as '100', instead of '1'. Is there a way to accomplish what I need for this form? Thank you.
ASKER
The time fields are 'In' and 'Out'. In the 'Hours' field, where I want the hours worked to be calculated, I use 'Out - In', using FormCalc. So, if Out='12:25' and In='11:00', the 'Hours' total shows as 135 instead of 1:35. If Out=5:00pm and In=11:00am, the Hours total shows as 600. The user enters the time in 24-hour format, ex: 1300 = 1pm. Thank you for your time.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thank you very much for the answer. It was EXACTLY the functionality that I needed. The speed and accuracy of your solution impressed me.
Hello
Very nice code.
The IsoTime2Num() function will convert the time (in 24h format) to milliseconds since the "epoch",
what if i want to convert the time in 12h format?
how will i go about it.
Thank you.
Very nice code.
The IsoTime2Num() function will convert the time (in 24h format) to milliseconds since the "epoch",
what if i want to convert the time in 12h format?
how will i go about it.
Thank you.
How are you calculating the diffrence?