View Full Version : Breakdown by hour query


travismp
12-09-2008, 06:11 AM
In my system it shows when my users lon in with a date/time stamp.

examples:
"12/9/2008 9:00:27 AM"
"12/9/2008 8:50:58 AM"
"12/9/2008 8:48:35 AM"
ect...


I want to write a query which will give me a count by day then hour. I want
the query recordset to show me something like this:

12/9/2008 | 10:00 - 10:59 | 46
12/9/2008 | 9:00 - 9:59 | 58
12/9/2008 | 8:00 - 8:59 | 23

So it will need to break down the day, then clump the hours, then count the records. Can this be done?

thanks.

rainman89
12-09-2008, 06:16 AM
sure can. use the dcount method
http://www.techonthenet.com/access/functions/domain/dcount.php

You will probalby have to combine queries to get exactly what you want to show

travismp
12-09-2008, 06:18 AM
thank you rainman. I will check it out & check back if I get stuck. THANK YOU again.

namliam
12-09-2008, 06:25 AM
*UGH* DCount in a query??? Please dont.. that is going to be SO SLOW!

You should make a group by query.
Use Hour(YourTime) to extract the time...

TimeFrame: Hour(yourTime) & ":00-" & Hour(Yourtime) & ":59"

Good luck

rainman89
12-09-2008, 06:30 AM
*UGH* DCount in a query??? Please dont.. that is going to be SO SLOW!

hmm.. Good to know!

Singh400
12-09-2008, 07:01 AM
*UGH* DCount in a query??? Please dont.. that is going to be SO SLOW!Where is the slap-hand-on-your-forehead emoticon? :D

namliam
12-09-2008, 09:21 AM
Where is the slap-hand-on-your-forehead emoticon? :D

LOL as in my and or what?? Please elaborate :cool: