Hi Sam
Certainly this is feasible, and there must be many thousands of databases
that perform this kind of calculation.
How you go about it depends on what data you have.
If you have a table of attendance records with, say, EmployeeID, StartTime
and FinishTime, then the time worked for that "session" is simply the
difference between the two times.
You can then add up those times to give a total for a pay period, or
whatever you need.