Results 1 to 4 of 4
  1. #1
    mlopez is offline Novice
    Windows XP Access 2007
    Join Date
    Jul 2012
    Posts
    2

    Interval Reporting


    Hello everyone,
    I work at a call center and I am trying to make an interval report using our individual call records. The easiest way I figured to do this in access was using
    Code:
    Int([Dialer Results]![Time]*48/48)
    as an expression to convert my existing timestamp into the nearest whole time (Ex. 9:36:45 AM to 9:30 AM) and a column "interval" or "Time Block" to see what block the call was made on. This works fine in excel but when I try doing this in my Access query I get #Error for all my records. I've also tried
    Code:
    Format(Int(([Dialer Results]![TIME]*48)/48),"h:nn AM/PM")
    with no luck. Any help would be appreciated, I'm also open to changing the way I build this Interval Report as I am a mere novice.

  2. #2
    ssanfu is offline Master of Nothing
    Windows XP Access 2000
    Join Date
    Sep 2010
    Location
    Anchorage, Alaska, USA
    Posts
    9,664
    Welcome to the forum mlopez.

    The first thing you should know is that "Time" is a reserved word in Access and shouldn't be used as an object name.
    See: http://allenbrowne.com/AppIssueBadWord.html

    Also, you shouldn't use spaces or special characters in object names, only letters and numbers.
    See: http://access.mvps.org/access/tencommandments.htm

    If you are trying to do this conversion in a query, try:
    Code:
    Interval: TimeSerial(Hour([sTime]),Minute([sTime]),0)
    where "sTime" is the name of the time field.

  3. #3
    mlopez is offline Novice
    Windows XP Access 2007
    Join Date
    Jul 2012
    Posts
    2
    Thanks for your response.
    I will definitely take all your suggestions into consideration. Using the formula you have me was helpful but what I received in return was more 9:36:41 AM being converted into 9:36:00 AM. I needed it to turn into 9:30 AM. Anything else you think of?
    Quote Originally Posted by ssanfu View Post
    Welcome to the forum mlopez.

    The first thing you should know is that "Time" is a reserved word in Access and shouldn't be used as an object name.
    See: http://allenbrowne.com/AppIssueBadWord.html

    Also, you shouldn't use spaces or special characters in object names, only letters and numbers.
    See: http://access.mvps.org/access/tencommandments.htm

    If you are trying to do this conversion in a query, try:
    Code:
    Interval: TimeSerial(Hour([sTime]),Minute([sTime]),0)
    where "sTime" is the name of the time field.

  4. #4
    ssanfu is offline Master of Nothing
    Windows XP Access 2000
    Join Date
    Sep 2010
    Location
    Anchorage, Alaska, USA
    Posts
    9,664
    This will give you ten minute intervals. 30 to 39 minutes returns 30; 40 to 49 returns 40, ...
    Code:
    Interval: TimeSerial(Hour([sTime]),Int(Minute([sTime])/10)*10, 0)
    To get the nearest ten minutes, use
    Code:
    Interval: TimeSerial(Hour([sTime]),Int((Minute([sTime])+5)/10)*10, 0)
    so 25 to 34 returns 30, 35 to 44 returns 40, etc

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

Similar Threads

  1. reporting
    By jaykappy in forum Reports
    Replies: 10
    Last Post: 02-16-2012, 03:02 PM
  2. Replies: 13
    Last Post: 10-12-2011, 11:08 AM
  3. Reporting Issue
    By watzmann in forum Access
    Replies: 1
    Last Post: 08-30-2010, 08:16 PM
  4. Question on Reporting
    By jbarrum in forum Access
    Replies: 20
    Last Post: 01-14-2010, 02:05 PM
  5. Dynamic reporting
    By pushpm in forum Programming
    Replies: 0
    Last Post: 04-22-2009, 12:45 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