These forums are now Read Only. If you have an Acrobat question, ask questions and get help from one of our experts.

Timesheet Calculations (have read but still can't figure out)

jessicagordon
Registered: Jan 15 2010
Posts: 2

I have read many posts on here about how to get your timesheet (created in LiveCycle) to calculate hours but I am confused about what exactly to enter for the code.

Here's what I would like to happen:

RegHrs = ((LunchOutTime - StartTime) + (EndTime - LunchInTime)) / 100

This works great for the numeric fields which can only use military time to calculate correctly (hence the "divided by 100" to get a figure that looks like 8.0 hours). The problem is, no one wants to use military time.

What type of field do I need to use for regular time? Numeric? Date/time? Other?

And what code do I need to enter to get the results I need? For example,

Employee enters 8:00 am for StartTime, then 12:00 pm for LunchOutTime, then 1:00 pm for LunchInTime and then 5:00 pm for EndTime. And the form miraculously calculates 8 hours for them!

I really need this spelled out because I am extremely new to LiveCycle and haven't not had much training.

Thank you so much!

My Product Information:
LiveCycle Designer, Windows
gkaiseril
Online
Expert
Registered: Feb 23 2006
Posts: 4308
Have you looked at [url=http://www.acrobatusers.com/forums/aucbb/viewtopic.php?id=23707]FormCalc or Javascript Date Formulas[/url]?

George Kaiser