Re: Tracking Time Spent
From: John Vinson (jvinson_at_STOP_SPAM.WysardOfInfo.com)
Date: 07/28/04
- Next message: Michel Walsh: "Re: Indirect reference to Textbox control method"
- Previous message: Lori: "Re: Command Button"
- In reply to: BT: "Tracking Time Spent"
- Messages sorted by: [ date ] [ thread ]
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
- Next message: Michel Walsh: "Re: Indirect reference to Textbox control method"
- Previous message: Lori: "Re: Command Button"
- In reply to: BT: "Tracking Time Spent"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|