Results 1 to 2 of 2
  1. #1
    Abarency is offline Novice
    Windows 7 64bit Access 2007
    Join Date
    Sep 2012
    Posts
    9

    Counting number of instances by time of day

    I have a table with occurrences and I need a query that will return the number of occurrences that happen within each hour of the day. Kind of like a bunch of Countif statements nested.



    Ex

    00:00 - 01:00 1 Occurrence
    01:00 - 02:00 2 Occurrences
    02:00 - 03:00 0 Occurrences
    03:00 - 04:00 5 Occurrences
    and so forth.

    I will also have a between date parameter as well.

    Any ideas?

  2. #2
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,530
    Use the Hour() function in a totals query.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

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

Similar Threads

  1. Replies: 21
    Last Post: 11-07-2012, 02:14 PM
  2. Counting instances across multiple tables
    By New_2_Access in forum Queries
    Replies: 1
    Last Post: 07-19-2012, 04:47 PM
  3. Replies: 3
    Last Post: 05-12-2012, 04:52 AM
  4. Counting the number of enrollees on a course
    By slaterino in forum Access
    Replies: 2
    Last Post: 10-12-2010, 12:24 AM
  5. Replies: 4
    Last Post: 08-27-2009, 01:21 AM

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