Calculating Total Hours

K

kaylo

I’ve been working with this dbase for a week now and I am able to get the sub
total correctly using this formula in the form [Employee] and queries
[Individual Time Sheet] “=NZ([Time out1]+1-[Time In1])+NZ([Time Out2]+1-[Time
In2])â€. But when I go to Report and using the formula “=Sum([Sub Total])†for
dates 10/05/08 (=19:00) and 10/06/08 (9:00) for John Torres, I’m getting 2.
1666666.

Please help.
 
J

Jeff Boyce

What is the data type for [IndividualTimeSheet]?

Why are you adding +1 to the [TimeOut1] and to the [TimeOut2]?

To find the difference between two date/time values (?!what data types are
your TimeOut and TimeIn fields?!), you can use the DateDiff() function, and
specify hours or minutes or ...

More info, please!

Regards

Jeff Boyce
Microsoft Office/Access MVP
 
A

Anthos

Being that you are talking about calculating the differences between
to time values (that perhaps are on different dates) you might be
better off using the datediff function rather then the sum function,
The datediff will tell you how many [time units] have passed between
two date fields (of different dates)

As Jeff has stated though, we probably need more information both on
structure and what you are trying to achieve..
the 2.1666 could also be a serialised time between the two dates (and
times) and perhaps you are after the total hours in decimal format
(14.0)

Regards,
Anthony Moore

IT Excellence
 
Top