Monthly Timesheet

R

Roberto

I have inherited a monthly timesheet, which tracks employees flexible working
times. The daily hours worked are given as 7 hours 24 minutes and there is
an expression of =0.308333333333333 shown in the default value of TblDay in
the design view of the table. My question is how and where do I change this
value so that the time becomes 7 hours 30 minutes? There are corresponding
entries for the half days also.
 
D

Duane Hookom

I realize you inherited this but you should not store time durations in a
date/time field. As you have found, this is confusing. If someone asked me
how long I worked today, I wouldn't say "8 o'clock". I would provide the
number of hours and/or minutes.

The default value of 0.308333333333333 equals 7:24 AM. You would be better
off storing the duration as the number of minutes (444).

The value 0.3125 is the same as 7:30 AM. If the default value changes
(which it appears to happen) you are much better off storing the default
value in a lookup table. When your data entry form opens, grab the default
value from the lookup table.
 
R

Roberto

Thanks very much. It looks like the designer of the original database used
times instead of hours here. The funny thing is it seems to work OK and
everyones times are correct :) I just have to make a minor change to hours
worked as part of a pay package involving flex time. I think I would be
better redsigning the whole thing as it appears needlessly complicated in
parts. Thanks again for the help.
 
D

Duane Hookom

The date/time values entered into your table are a floating point number
that describes the number of days since Dec 30, 1899. A value of .3125 is
7:30 AM Dec 30, 1899. Each day has a value of one. As I type this, the
current date/time value is 38339.4712962963. 12 hours (one half day) is .5.
 

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