[AccessD] Recording Time

Mark A Matte markamatte at hotmail.com
Fri Jun 2 10:24:24 CDT 2006


Larry,

I've done a few apps with times.  I have always stored either the total 
minutes(or seconds) or the actual start and end times...then just 
manipulated these to display whatever format you want.  Below is something I 
used a few years ago...with the help of this group.  It was a stopwatch type 
function for measuring the length of calls and displaying in minutes and 
seconds.  Hope it helps.  Let me know if you have any questions.

Thanks,

Mark A. Matte
******************************************
Me!EndDTTM = Now()
Dim Seconds
Dim RMmin
Dim RMsec
Seconds = DateDiff("s", Me!StartDTTM, Me!EndDTTM)
Dim Check, Counter
Check = True: Counter = 0

Do
    Counter = Counter + 1
    If Counter * 60 > Seconds Then
        RMmin = Counter - 1
        RMsec = Seconds - ((Counter - 1) * 60)
        Check = False
        Exit Do
    End If
Loop Until Check = False
Forms!frmRecords!RMCallLengthM.Value = RMmin
Forms!frmRecords!RMCallLengthS.Value = RMsec
******************************************

>From: "Lawrence Mrazek" <lmrazek at lcm-res.com>
>Reply-To: Access Developers discussion and problem 
>solving<accessd at databaseadvisors.com>
>To: "'Access Developers discussion and problem 
>solving'"<accessd at databaseadvisors.com>
>Subject: [AccessD] Recording Time
>Date: Fri, 2 Jun 2006 09:48:24 -0500
>
>
>Hi Folks:
>
>I have an app that tracks time spent on various activities (production,
>cleaning, etc.).
>
>I'd appreciate some opinions on the best ways to record the time spent.
>Basically, we're looking at hours and minutes spent, usually something like
>four hours, 15 minutes. I considered having the app record the time as: 
>4.25
>(4 hrs 15 minutes), but this approach seems to confuse some of the users.
>
>Another approach would be to use two text boxes to collect hours and
>minutes, then convert and store the data as minutes. (I could use a display
>format to convert the minutes into something like: 4:15).
>
>Any ideas on best practices for storing this type of data?
>
>Thanks in advance!
>
>Larry Mrazek
>LCM Research, Inc.
>www.lcm-res.com
>lmrazek at lcm-res.com
>ph. 314.432.5886
>fx. 314.432.3304
>
>
>--
>AccessD mailing list
>AccessD at databaseadvisors.com
>http://databaseadvisors.com/mailman/listinfo/accessd
>Website: http://www.databaseadvisors.com





More information about the AccessD mailing list