Calculate 24 hour count

  • Thread starter Thread starter Kelly
  • Start date Start date
K

Kelly

Hi,
I have a database that I need to count the parts made for that full day of
production. I do have a percentage time for jobs completed active on the
form, but I need also have the count of current pieces produced in since the
past midnight.

Can I do this in a query expression?

Thanks!
Kelly
 
On Tue, 12 Aug 2008 17:10:40 -0700, Kelly

You could create a totals query, something like:
select count(*)
from SomeTable
where FinishDateTime between DateAdd("d",-1,Date()) and Date()

Or you could create a similar expression using the DCount function.

-Tom.
Microsoft Access MVP
 
Tom, Thank you - I'll give it a try

Tom van Stiphout said:
On Tue, 12 Aug 2008 17:10:40 -0700, Kelly

You could create a totals query, something like:
select count(*)
from SomeTable
where FinishDateTime between DateAdd("d",-1,Date()) and Date()

Or you could create a similar expression using the DCount function.

-Tom.
Microsoft Access MVP
 

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

Back
Top