Re: Tracking Time Spent

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance

From: John Vinson (jvinson_at_STOP_SPAM.WysardOfInfo.com)
Date: 07/28/04


Date: Wed, 28 Jul 2004 10:16:23 -0600

On Wed, 28 Jul 2004 06:55:01 -0700, "BT"
<BT@discussions.microsoft.com> wrote:

>Hello,
>
>I want to allow users of my database to keep track of time spent on a task by letting them add hours and minutes to a field with buttons for 5, 10 and 30 minutes and 1 hour.
>
>The only way I can think of it to keep track of minutes and when it reaches 60 to add the hour and zero out the minutes. Is there a better way or a function that does this?
>
>Thanks

The DateAdd() function can add seconds, minutes, hours or any other
time unit: DateAdd("n", Me!cboAddTime, Me!txtTaskTime)

will add the selected number of miNutes ("m" is Months) to the
date/time field in the textbox named txtTaskTime.

Note that Date/Time values are not really appropriate for durations;
#2:30# is actually the same as #12/30/1899 02:30:00#. Durations
exceeding 24 hours will just roll over into December 31 and so on.
Consider storing the duration just as a long integer count of minutes.

                  John W. Vinson[MVP]
    Come for live chats every Tuesday and Thursday
http://go.compuserve.com/msdevapps?loc=us&access=public



Relevant Pages

  • Re: sum calculation is not accurate
    ... works on a small amount of records, ... If this is a Date/Time field, note that such fields are stored as a Double ... As such they work best as points in time, not as durations. ... 01:00:00# which will display as 1 hour. ...
    (microsoft.public.access.forms)
  • Re: Data Time Lapse Greater than 24 hours
    ... "durations" in a date/time field. ... > I am importing data from Excel to an Access table and some of the "timed" ... > into time format to use in my calculations. ...
    (microsoft.public.access.tablesdbdesign)
  • Re: Help Please!
    ... > I have a report with a column that is base on time. ... If your column is a date/time field, ... to use a date/time field to store durations. ...
    (microsoft.public.access.forms)
  • Re: interpretting F & t-vals from regression
    ... these are treatment contrasts so they may not be differences from zero. ... I have subjects each doing 5 durations. ... you have fit the interaction between duration and intensity without ... significant difference in the estimated slopes of intensity across ...
    (sci.stat.consult)
  • Re: interpretting F & t-vals from regression
    ... these are treatment contrasts so they may not be differences from zero. ... I have subjects each doing 5 durations. ... significant difference in the estimated slopes of intensity across ...
    (sci.stat.consult)