hours worked minus lunch

  • Thread starter Thread starter Maarkr
  • Start date Start date
M

Maarkr

I thought i'd make an easy db to track hours worked, so I
used a text field linking start and end time, say 8:00, to
a value in another table, then subtract the two to get
total hours worked: the value for 5:00 pm is 9, minus the
value for 8:00 am ( 0 ) equals 9 hours worked (4:00= 8,
3:00= 7, 2:00= 6 etc). Sounds simple, but now I need to
subtract out an hour for lunch everyday to compute totals
of different weeks. This is easy if I work the whole day,
but I charge in 1 hour increments, so I might spend a day
doing project A from 8 to 10, project B from 10 to 2,
project C from 2 to 5, and I need to subtract out an hour
for lunch during the 10 to 2 period. I want to
automatically use 12 to 1 as the lunch period so my
reports total hours per project; total work is usually 8
hours per day, 40 hours per week. Ideas? Should I scrap
the number link idea?
 
I don't understand why 5:00 is equal to 9? 5:00 is 17:00 in military time.
Why did you create a brand new numbering system? (17:00 - 8:00 =9.0)

It seems to me that you might have to build some type of if statement
saying...

IF start time is before 12:00 AND end time is after 1:00, THEN subtract an
hour for lunch.

I'll let you work out where to put the statement in your design.

Rick B



I thought i'd make an easy db to track hours worked, so I
used a text field linking start and end time, say 8:00, to
a value in another table, then subtract the two to get
total hours worked: the value for 5:00 pm is 9, minus the
value for 8:00 am ( 0 ) equals 9 hours worked (4:00= 8,
3:00= 7, 2:00= 6 etc). Sounds simple, but now I need to
subtract out an hour for lunch everyday to compute totals
of different weeks. This is easy if I work the whole day,
but I charge in 1 hour increments, so I might spend a day
doing project A from 8 to 10, project B from 10 to 2,
project C from 2 to 5, and I need to subtract out an hour
for lunch during the 10 to 2 period. I want to
automatically use 12 to 1 as the lunch period so my
reports total hours per project; total work is usually 8
hours per day, 40 hours per week. Ideas? Should I scrap
the number link idea?
 
Back
Top