Total hours worked over a period of time

The scenario:

In a monthly payroll scenario, where the payroll period is from the 25th of one month to the 24th of the next month, a staff member works a varied number of hours each day and worked for a number of days within the payroll period.

There are also a number of staff members working under the same circumstances - that is, working a number of hours each day for a number of days during a payroll period

How do I calculate in Knack the total number of hours worked "per payroll period" "per staff member"?

Note 1 - the staff member submits a timesheet each day recording the total number of hours they've worked for that day.

Note 2 - I have created objects for Staff Members, Pay Periods, Timesheet, Timecard etc.

This can be done in Excel as shown here https://exceljet.net/formula/get-work-hours-between-dates - so looking to be able to do same in Knack.

Also, I've tried the netWorkDays function in Knack but it keeps returning the wrong output:

![](upload://auTfPdJFAEkKjxGeEZL1Pbh8ujZ.png)

Thanks in advance!

Just add a Sum field. 

![](upload://1e0iVWm65v69kCj2zNDrceGyRho.png)

 

Julian

Hi Julian, could you please give me an idea of the types of fields you added in the pay period record for each employee that summarise the records? I think I already have the master pay period record/object that you mentioned. Thanks very much!

Well I've done this by having a pay period record for each employee and then adding fields in there that summarize the time records.. Since the Time records are attached to the pay period, it gives you that value.. Then you could have the employee pay period records attached to a master pay period record with again summarization fields.. 

 

Julian