Between times - Need Help Fast Please

S

Sean

I did this once but fogot how. I have an order table with an order entry
time. I have several months worth of data. I built another table that has
time intervals. Example

Interval Stime ETime
8-9am 8:00:00am 8:59:59am

I cannot remember how to set up a query with both tables so I can do a
count on the orders entered between time intervals, i.e. 200 between 8 and
9am. Can someone help?
Sean
 
K

KARL DEWEY

Try this (not tested after editing table and field names) ---
SELECT [Time interval].[Interval], Count([order table].[order entry time])
AS CountOfTime
FROM [order table], [Time interval]
WHERE ((([order table].[order entry time]) Between [Stime] And [Etime]))
GROUP BY [Time interval].[Interval];
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top