Hi All,
I am using MS Access 2010. I am working out each member of staffs working hours for the month in a MS Access query.
[WorkDate]
[TimeIn]
[TimeOut]
minus a 1 hour lunch.
I would like to display the total hours worked for the month in a hours : minutes format.
I tried this approach: -
Call a field WorkHoursPerMin in a query:-.
Make a GroupBy query and Sum this field.
For the display I used a second query based on the first where I did the following:
My idea is to show a column with the month of the year and a second with the number of hours worked in that month.
Your help with this is greatly appreciated.
I am using MS Access 2010. I am working out each member of staffs working hours for the month in a MS Access query.
[WorkDate]
[TimeIn]
[TimeOut]
minus a 1 hour lunch.
I would like to display the total hours worked for the month in a hours : minutes format.
I tried this approach: -
Call a field WorkHoursPerMin in a query:-.
Code:
WorkHoursPerMin: Sum(DateDiff("n",[timeIn],[timeOut]))
Make a GroupBy query and Sum this field.
For the display I used a second query based on the first where I did the following:
Code:
WorkHoursPerMonth: CDate([WorkHoursPerMin]\60 & ":" & [WorkHoursPerMin] Mod 60)
My idea is to show a column with the month of the year and a second with the number of hours worked in that month.
Your help with this is greatly appreciated.
Last edited: