[AccessD] Best Practices: Recording Hours and Minutes

Lawrence Mrazek lmrazek at lcm-res.com
Sat Jan 20 12:15:58 CST 2007


Hi Mark:

Thanks for the feedback. I like your approach; It will be workable and
manageable for my application.


Larry Mrazek
LCM Research, Inc.
www.lcm-res.com
lmrazek at lcm-res.com
ph. 314-432-5886
mobile: 314-496-1645


-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Mark A Matte
Sent: Thursday, January 18, 2007 12:45 PM
To: accessd at databaseadvisors.com
Subject: Re: [AccessD] Best Practices: Recording Hours and Minutes

Larry,

I don't know if it is best practice...but I have a number of dbs with 'time
tracking' functionality.  I either store the start time and end time...and
then calculate the difference...or I store the smallest increment I need and
then calculate from there.  For example...I needed to display minutes and
seconds...so I stored seconds and used the following to convert to display
minutes and seconds:

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

Again, not sure if it is best practice...but works for me.

Good Luck,

Mark A. Matte


>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] Best Practices: Recording Hours and Minutes
>Date: Thu, 18 Jan 2007 11:36:05 -0600
>
>Hi:
>
>I'm trying to figure out the best ways to record hours and minutes 
>(application tracks downtime of various equipment and time spent on 
>maintenance), and am wondering how others do this.
>
>I'm currently using a decimal field to record the hours and minutes (EX:
>1.25 is 1 hour, 15 minutes), but am wondering if I should do this 
>differently as far as data entry and storage.
>
>Thanks in advance.
>
>Larry Mrazek
>LCM Research, Inc.
>www.lcm-res.com
>lmrazek at lcm-res.com
>ph. 314-432-5886
>mobile: 314-496-1645
>
>
>--
>AccessD mailing list
>AccessD at databaseadvisors.com
>http://databaseadvisors.com/mailman/listinfo/accessd
>Website: http://www.databaseadvisors.com

_________________________________________________________________
Laugh, share and connect with Windows Live Messenger
http://clk.atdmt.com/MSN/go/msnnkwme0020000001msn/direct/01/?href=http://ima
gine-msn.com/messenger/launch80/default.aspx?locale=en-us&source=hmtagline

--
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