Counting EachDayOfWeek

W

williamr

I'm trying to count how many times something happened on Mon, Tues, Wed... I
have this code in a query trying to make it work, I have been unsuccessful.
If I can get Mon to work......

Thank You
SELECT Count(IIf(format(daterelease,'w')=2,1,Null)) AS Mon
FROM Offsites;
 
A

Allen Browne

Try entering this into the Field row in design view:
Weekday([daterelease])

You can then use that expression as the Column Heading for a Crosstab query.
 
N

NotGood@All

What is a Crosstab query?? I want to make this query the source for a form
that shows the stats for the past year. I' trying to show the workload by
day with lets say a total of 500 releases done for the year and 92 done on
Mon & a %, etc..
--
NotGood@All


Allen Browne said:
Try entering this into the Field row in design view:
Weekday([daterelease])

You can then use that expression as the Column Heading for a Crosstab query.

--
Allen Browne - Microsoft MVP. Perth, Western Australia

Reply to group, rather than allenbrowne at mvps dot org.

williamr said:
I'm trying to count how many times something happened on Mon, Tues, Wed...
I
have this code in a query trying to make it work, I have been
unsuccessful.
If I can get Mon to work......

Thank You
SELECT Count(IIf(format(daterelease,'w')=2,1,Null)) AS Mon
FROM Offsites;
 
D

Douglas J. Steele

When you go to create a new query, one of the choices you get is "Crosstab
Query Wizard". Select that, base the crosstab query on the query you already
have (modified as suggested by Allen), and follow the wizard's instructions.

--
Doug Steele, Microsoft Access MVP

(no private e-mails, please)


NotGood@All said:
What is a Crosstab query?? I want to make this query the source for a
form
that shows the stats for the past year. I' trying to show the workload by
day with lets say a total of 500 releases done for the year and 92 done on
Mon & a %, etc..
--
NotGood@All


Allen Browne said:
Try entering this into the Field row in design view:
Weekday([daterelease])

You can then use that expression as the Column Heading for a Crosstab
query.

--
Allen Browne - Microsoft MVP. Perth, Western Australia

Reply to group, rather than allenbrowne at mvps dot org.

williamr said:
I'm trying to count how many times something happened on Mon, Tues,
Wed...
I
have this code in a query trying to make it work, I have been
unsuccessful.
If I can get Mon to work......

Thank You
SELECT Count(IIf(format(daterelease,'w')=2,1,Null)) AS Mon
FROM Offsites;
 

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