Count Occurence Between Times

dmarsh61

New member
Local time
Today, 08:59
Joined
Jan 8, 2016
Messages
8
This is my first post requesting help so I hope that I get it right!
I have a table that contains fields for cellular phone usage. The important fields for this question are Invoice Date, Name and Time (time that a call was made or received in a hh:mm format).
I want to be able to count the number of calls made and received between certain hours of the day. (e.g. between #00:00:01 AM# and #05:30:00 AM#, #05:30:01 AM# and #15:30:00 PM#, etc.
There are 3 different employees and 7 different Invoice Dates and I would like to be able to do it in as few steps as possible.
Any help would be greatly appreciated. Thanks
 
Do you have a StartTime and StopTime in your table? Can you show us some sample records.
 
There is no StartTime or StopTime in the table. There are 6,012 records that is like below.
The data is organized as such:
Mobile Nbr Name Invc Date Time
9051234567 John 16/7/2015 0:19
9051230987 Bernie 16/7/2015 0:22
9051234567 John 16/10/2015 8:13
9051236824 Steve 16/7/2015 4:30

I would like to specify in a query what the range is: ">#00:00:01 AM# and <#05:30:00 AM#" ; ">#05:30:01 AM# and <#15:30:00 PM#". (exclude the quotation marks)
I hope that this answers your question and provides more info.
 
you haven't provided much detail so can only provide a general answer. Also, date, name and time are all reserved words, so using them can cause problems, if these are your real names, strongly recommend you change them

assuming your time field is just time and does not include the date, and is a datetime field and not text your criteria would be

time between #00:00:01# and #05:30:00# OR time between #05:30:01# and #15:30:00#

notes - time is a reserved word - and returns the time now - so hope you can see why using it as a field name is a bad idea sinc ethe above may not work
don't mix 24hr and AM/PM styles with your times
 
Sorry, I forgot to add that I would like to do the count of calls by month. So basically Employee A received or made 7 calls during the time of midnight to 5:30 am on the July 16 invoice,
Employee B received or made 17 calls during the time of midnight to 5:30 am on the July 16 invoice, etc.
 

Users who are viewing this thread

Back
Top Bottom