If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
Time calculation
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; |
#2
|
|||
|
|||
Time calculation
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" wrote in message ... 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; |
Thread Tools | |
Display Modes | |
|
|