UtterAccess.com
X   Site Message
(Message will auto close in 2 seconds)

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
> Best Method For Storing Date & Time Information    
 
   
Buckeye2011
post Jan 24 2012, 08:36 PM
Post #1

UtterAccess Enthusiast
Posts: 75



I have been building an Access database for about two years now and am just starting on a new project.
What is the best date type to set up a Date/Time record that is easy to enter in, but yet keeps specific date and time information?

The data I’m collecting is for production logs with information including:
Date
Start Time
Stop Time
Down Time

I need to be able to figure the time between the start and stop, as well as subtracting out the down time. I would also like to track the amount of time from the “Stop Time” in one record to the “Start Time” in the next record. Is that even possible to do automatically?

I’ve done some with date and time in previous projects, and it always seemed like it could be done a little easier.

Any suggestions, advise?
Go to the top of the page
 
+
theDBguy
post Jan 24 2012, 09:25 PM
Post #2

Access Wiki and Forums Moderator
Posts: 48,599
From: SoCal, USA



Hi,

What version of Access are you using? Knowing the Access version may help us determine a more appropriate response to your question.

In my humble opinion, you could stick with just two Date/Time fields to store the date and time for the "start" and the date and time for the "stop." The other parts, such as the down time and time difference between records, can be calculated from those two.

Just my 2 cents... (IMG:style_emoticons/default/2cents.gif)
Go to the top of the page
 
+
Buckeye2011
post Jan 24 2012, 09:44 PM
Post #3

UtterAccess Enthusiast
Posts: 75



Access 2010.

I guess my question is, how do I turn "1/20/2012 3:26PM" into just having to key in "3:26 PM"

Part 2: How do you calculate the difference between the last stop and next start?

Thanks in advance.
Go to the top of the page
 
+
theDBguy
post Jan 24 2012, 10:09 PM
Post #4

Access Wiki and Forums Moderator
Posts: 48,599
From: SoCal, USA



Hi,

QUOTE (Buckeye2011 @ Jan 24 2012, 07:44 PM) *
Access 2010.

Thanks.


QUOTE
I guess my question is, how do I turn "1/20/2012 3:26PM" into just having to key in "3:26 PM"

Not sure but this demo might help:

Time Pieces Demo


QUOTE
Part 2: How do you calculate the difference between the last stop and next start?

For that, check out the techniques presented in this MS Article:

ACC: Referring to a Field in the Previous or Next Record

Just my 2 cents... (IMG:style_emoticons/default/2cents.gif)
Go to the top of the page
 
+

Thank you for your support! Reply to this topicStart new topic

Jump To Forum:
 



RSS Go to Top  ·  Lo-Fi Version Time is now: 19th June 2013 - 03:25 AM