Counting EachDayOfWeek

  • Thread starter Thread starter williamr
  • Start date Start date
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;
 
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.
 
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;
 
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;
 
Back
Top