Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Database Design / December 2004

Tip: Looking for answers? Try searching our database.

Monthly Timesheet

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Roberto - 17 Dec 2004 23:39 GMT
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.
Duane Hookom - 18 Dec 2004 00:05 GMT
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.

Signature

Duane Hookom
MS Access MVP

>I have inherited a monthly timesheet, which tracks employees flexible
>working
[quoted text clipped - 7 lines]
> corresponding
> entries for the half days also.
Roberto - 18 Dec 2004 10:18 GMT
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.

> 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
[quoted text clipped - 20 lines]
> > corresponding
> > entries for the half days also.
Duane Hookom - 18 Dec 2004 17:19 GMT
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.

Signature

Duane Hookom
MS Access MVP

> Thanks very much.  It looks like the designer of the original database
> used
[quoted text clipped - 34 lines]
>> > corresponding
>> > entries for the half days also.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.