Time calculation

T

Tia

Dear all,

I am calculation total working hours per day for each employee along
with total ovt
on daily basis i am making the data entry for the attendance and i am
getting the ovt as short time
example

Employee Date total working hours Total OVT
Tia Kareem 1/1/2010 12:00 3:00
Tia Kareem 2/1/2010 12:00 3:00
Tia Kareem 3/1/2010 12:00 3:00
Tia Kareem 4/1/2010 12:00 3:00
jason 1/1/2010 12:00 3:00
jason 2/1/2010 12:00 3:00
jason 3/1/2010 12:00 3:00

What i need is to know how much is the total OVT by employee
i have used the group and the sum but what i am getting is a different
total than the one i have
If i sum it and put the format as short time i will get 12:00 and what
i should get is
SELECT [JAN ATTENDANCE].Employee, Sum([JAN ATTENDANCE].ovtperday) AS
SumOfovtperday
FROM [JAN ATTENDANCE]
GROUP BY [JAN ATTENDANCE].Employee;
 
D

Douglas J. Steele

The Date data time is intended for point-in-time values (i.e.: a specific
timestamp), not a duration. You'd be best off deciding the unit in which
you're interested (minutes? hours?) and storing the hours as a Long Integer
value in those units. You can always write your own function to format total
minutes to hh:nn.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top