Results 1 to 6 of 6
  1. #1
    Dutch1956 is offline Novice
    Windows 7 64bit Access 2007
    Join Date
    Sep 2011
    Posts
    12

    Time intervals

    I have a table with a start and stop time and a table with 30 minute segments in each field, like 00:00, 00:30, 01:00, etc.
    Using a query I would like the time period between the start and stop time to be shown in the minute segment fields like:
    start time 01:45, stop time 03:00
    I would like the following result:
    00:00=0
    00:30=0
    01:00=0
    01:30=0.50
    02:00=1
    02:30=1
    03:00=0


    etc.
    I managed to get this to work in Excel using the following formula:
    =MAX(0,MIN(D$1,$B2)-MAX(C$1,$A2))*48
    where the start time is in A2 and the stop time in B2.
    How can I get this to work in an Access query.

    I tried to put this in the criteria of each time field:
    DMAX(0,min([00:30],[stop time]-MAX([00:00],[start time]))*48,
    but receive the message that the function contains the wrong number of arguments.
    Any help is very much appreciated.


    Bert.

  2. #2
    dr4ke is offline Competent Performer
    Windows 7 32bit Access 2007
    Join Date
    Jun 2012
    Posts
    108
    Hi, I would recommend searching for each individual EXCEL formula's counterpart in Access and trying to work it out that way. Apologies, i'm not a master at Access but this should give you a starting point and will teach you loads

    For example; http://www.pcreview.co.uk/forums/exc...-t3102723.html

    Hope it helps

  3. #3
    orange's Avatar
    orange is offline Moderator
    Windows XP Access 2003
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,728
    You could try the Access Partition function - I'm not exactly sure what you're trying to do - but the link to Partition is
    http://office.microsoft.com/en-us/ac...001228892.aspx

    Good luck

  4. #4
    help_me_with_access is offline help_me_with_excel
    Windows XP Access 2007
    Join Date
    Jun 2012
    Posts
    262
    that's got to be more complicated than simply using partition(). access is not the program for this, sir.

    Try using a different program. the only way you're gonna get this to work in this program is to create multiple layers of stacked queries or just simply print in out with coding.

    that's all you've got I think.

  5. #5
    dr4ke is offline Competent Performer
    Windows 7 32bit Access 2007
    Join Date
    Jun 2012
    Posts
    108
    Why not let it run the code in Excel and import it into Access to do the rest of what you need?

  6. #6
    Dutch1956 is offline Novice
    Windows 7 64bit Access 2007
    Join Date
    Sep 2011
    Posts
    12
    Thank you all for your response. Unfortunately none of the suggestions is a solution to the problem I am trying to solve.
    I guess I will have to export the data to excel to make it work.
    Thanks again.

    Bert.

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

Similar Threads

  1. Replies: 8
    Last Post: 03-14-2012, 05:40 PM
  2. Replies: 1
    Last Post: 02-28-2012, 09:16 PM
  3. Replies: 1
    Last Post: 01-17-2012, 02:51 PM
  4. Urgent issue! Create field for intervals
    By Bjorn in forum Queries
    Replies: 3
    Last Post: 02-10-2010, 10:26 AM
  5. Help with Time Intervals
    By ddog171 in forum Queries
    Replies: 3
    Last Post: 03-07-2006, 06:20 AM

Tags for this Thread

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