Tia,
If the person responding to your question top-posts, please do
the same, so we can see the flow of the problem. Mixing top and
bottom posting makes the problem very difficult to follow.
First... describe in detail, each of the fields you have in your
table. (related to this time keeping)
For example... do you have a WorkStartDate field, and a separate
WorkStartTime field?
BreakStartDate and BreakStartTime?
BreakEndDate and BreakEndTime
WorkEndDate and WorkEndTime?
If your times can span over one day, then you need to capture the Date
and the Time, in order to correctly determine the difference in hours.
If your fileds are separated... (each all on one line)
Total Hours = (DateDiff("n",WorkStartDate + WorkStartTime) -
DateDiff("n",WorkEndDate + WorkEndTime)/60
BreakHours = (DateDiff("n",BreakStartDate + BreakStartTime) -
DateDiff("n",BreakEndDate + BreakEndTime)/60
HoursWorked = TotalHours - BreakHours
--
hth
Al Campagna
Microsoft Access MVP
http://home.comcast.net/~cccsolutions/index.html
"Find a job that you love... and you'll never work a day in your life."
Tia,
I think you are trying to say that you have break during the day,
within the day start D/T and the day end D/T.
I'll just work with the times here... but you can use your DateTime
values.
Example
DayStart BreakStart BreakStop WorkStop
9:00 am 12:00 pm 1:30 pm 4:00 pm
Determine the minutes between DayStart and DayEnd, and subtract the
difference between BreakStart and BreakEnd, and divide by 60 to get
hours.
=(DateDiff("n",DayStart,DayEnd) - DateDiff("n",BreakStart,BreakEnd)) /60
The above values would yield (420 mins - 90mins) / 60 = 5.5 hrs
--
hth
Al Campagna
Microsoft Access MVP
http://home.comcast.net/~cccsolutions/index.html
"Find a job that you love... and you'll never work a day in your life."
- Show quoted text -
I dont know whati am ding wrong, i tried it, but the result was empty
the format is under short time
TOTAL WORKING HOURS PER DAY: (DateDiff("n",[TIME IN],[TIME OUT])-
DateDiff("n",[TIME IN 2],[TIME OUT 2]))/60
Time IN: 5:00 tim out : 19 tim in 2 :20:00 time out2 : 23:00 i tried
to put 25 but i was not able to do so
THank you for your help