DATES TO DAYS-OF-WEEK

E

ERUCH

HOW CAN I CONVERT DATES IN A FIELD TO DAYS OF WEEK? I WANT
TO COUNT THE NUMBER OF OCCURRANCES ON EACH DAY OF THE WEEK.
PLEASE EXPLAIN IN LAYMAN'S TEDRMS. THANK YOU.

ERUCH
 
J

John Nurick

Hi Eruch,

1) Create a query that gets its data from your table (see "About
designing a query" in Help).

2) Don't include your date field in the query. Instead, use a calculated
field like I described in my response to your previous posting. Here's
what I said:

Using the query design grid, type something like this in the "Field"
cell where you want the day of the week to appear:

DayOfWeek: WeekdayName(Weekday([XXX],vbSunday),False,vbSunday)

Use the actual name of your date field in place of XXX. If you want Mon,
Tue... instead of Monday, Tuesday..., change the False to True.


3) Click the Totals button on the toolbar (its icon is the Greek letter
Sigma, which looks like an M standing on its side). This causes the
"Total" row to appear in the query design grid.

4) In the "Total" row in the column with the DayOfWeek calculated field,
select "Group By". For the other columns, select "Count", "Total" or
whatever else you want.

5) Preview the query.
 

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