From: Tia on
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;

From: Douglas J. Steele on
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.

--
Doug Steele, Microsoft Access MVP
http://www.AccessMVP.com/DJSteele
(no e-mails, please!)

"Tia" <tia.abdelkarim(a)gmail.com> wrote in message
news:fff72d7d-c8fb-4c5e-b766-5face8e16cc9(a)a12g2000yqj.googlegroups.com...
> 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;
>


 | 
Pages: 1
Prev: forms
Next: Save prompt is not working