Find all records for a specific month

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I'm trying to create a report that will tell me how many patients were seen
in a certain month. I'm trying to use the DCount function as follows:

=DCount("[SSN]","PatientsData",[DrawDate = blah blah")

blah blah represents that I want it to count all patients that were seen in
December of 2005. How do I do this?

Thanks
 
=DCount("[SSN]","PatientsData","[DrawDate] BETWEEN #12/01/2005# AND
#12/31/2005#")

This assumes that DrawDate only contains dates, no times. If there are
times, you'll need to use

=DCount("[SSN]","PatientsData","[DrawDate] BETWEEN #12/01/2005# AND
#1/1/2006#")

Alternatively, you could use

=DCount("[SSN]","PatientsData","Format([DrawDate], "yyyymm") = '200512'")

although that won't be as efficient.
 

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