Add up time

L

LG

I have inherited this DB that has many tables etc. One of the functions I
need to do is figure out how much time a person has worked in a month from a
table.
The fields are date, ClockIn, Break1Out, Break1In, LunchOut, LunchIn,
Break2Out, Break2In, ClockOut, Break3In, Break3Out.
What I am looking to do is take the total time from clockIn to ClockOut and
subtract the breaks and lunch time. I need this by Person for ? period of
time and combine in together to = 1 number for the month.
Any help would be appreciated.
 
J

John W. Vinson

I have inherited this DB that has many tables etc. One of the functions I
need to do is figure out how much time a person has worked in a month from a
table.
The fields are date, ClockIn, Break1Out, Break1In, LunchOut, LunchIn,
Break2Out, Break2In, ClockOut, Break3In, Break3Out.
What I am looking to do is take the total time from clockIn to ClockOut and
subtract the breaks and lunch time. I need this by Person for ? period of
time and combine in together to = 1 number for the month.
Any help would be appreciated.

You'll need a Query using the DateDiff() function to calculate the length of
each work period. Type Ctrl-G to open the VBA editor and press F1 to get help;
look at the Help message for DateDiff.

This may be a bit more complex if some of the fields are NULL (i.e. the person
didn't take Break2, or (worse) forgot to clock in or clock out).
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top