Results 1 to 4 of 4
  1. #1
    llitvin is offline Novice
    Windows 7 64bit Access 2007
    Join Date
    Sep 2013
    Posts
    6

    Calculating time between entries

    I have a table where a start time and stop time are recorded for a particular piece of equipment. There are 3 pieces of equipment that are selectable on the record. I would like to calculate the down-time for each piece of equipment (the duration between the stop time and the start time).



    I appreciate any suggestions. Thank you.

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,770
    Are start and stop times in same or separate records?

    Provide sample data.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  3. #3
    llitvin is offline Novice
    Windows 7 64bit Access 2007
    Join Date
    Sep 2013
    Posts
    6
    Each record has a start and stop time. I would like to know the time difference between "record 1" stop time and "record 2" start time for the same reactor. Here is some sample data that you requested. Using the data as an example, I would like to calculate the difference between the two red highlighted cells.

    Reactor
    Start Date/Time Stop Date/Time
    1 6/27/2013 21:53 7/3/13 12:24 AM
    3 7/1/2013 16:45 7/3/13 4:05 PM
    2 7/2/2013 14:48 7/4/13 9:57 PM
    1 7/3/2013 0:33
    7/8/13 11:13 AM
    3 7/4/2013 10:41 7/9/13 11:40 AM
    2 7/4/2013 22:59 7/11/13 1:51 AM
    1 7/8/2013 16:24 7/10/13 1:34 AM
    3 7/9/2013 13:47 7/11/13 9:23 AM
    1 7/10/2013 3:00 7/12/13 12:40 AM
    2 7/11/2013 2:06 7/16/13 8:45 PM
    3 7/11/2013 21:10 7/17/13 11:09 AM
    1 7/16/2013 23:37 7/18/13 5:46 AM

    Thank you for your help.

  4. #4
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,770
    Getting value from another record of same table is tricky. Use a subquery. Review http://allenbrowne.com/subquery-01.html#AnotherRecord

    A DMax() might also accomplish but domain aggregate functions can cause a query to run slow, especially on a large dataset.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Calculating days & Time
    By siapliw in forum Forms
    Replies: 5
    Last Post: 09-11-2012, 11:44 AM
  2. Replies: 8
    Last Post: 08-24-2012, 01:54 AM
  3. Calculating Overtime hours from Time entries
    By weshader in forum Programming
    Replies: 3
    Last Post: 11-13-2011, 01:08 AM
  4. Calculating Time
    By jlclark4 in forum Forms
    Replies: 0
    Last Post: 04-25-2011, 09:04 AM
  5. Replies: 12
    Last Post: 02-22-2011, 03:39 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums