Counting Unique Dates

  • Thread starter Thread starter Rick Z
  • Start date Start date
R

Rick Z

I was wondering if anybody could tell me a way to count
the total of unique dates in a query. For instance, In a
report that returns production information, I need to
return the number of days worked. Each day worked may have
3 or 4 different production items. Each production item is
recorded with its date and shift but needs to be counted
as one production day. There may be several days between
when there is no production which I dont want to count or
there may be partial days worked that I do want to count.

This seems like it should be such a simple thing to do but
it seem I'm not getting it,

Any help would be appreciated.

thanks,
Rick
 
Rick,

SELECT Count(*) As DaysWorked FROM
(SELECT DISTINCT myDates FROM tblMyTable)

Regards,
Graham R Seach
Microsoft Access MVP
Sydney, Australia
 

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