Weekend and holiday dates only

  • Thread starter Thread starter CMM
  • Start date Start date
For holidays, your only real choice is to have a table of holiday dates, and
join that to your existing table.

For weekends, you could use WHERE Weekday(MyDateField) IN (1, 7)
 
Is the MyDateField where I put a to and from date? For example, I want to run
the query from 11/01/07 through 11/30/07. Also, do I extend the IN (1,7) to
IN (1,7,8,14,15,21,22,29)? An example would be great if available. Thank you
again!
 
MyDateField would be the name of the date field in your table.

Weekday returns number 1 through 7 for Sunday through Saturday respectively.

You'd want

WHERE Weekday(MyDateField) IN (1, 7)
AND MyDateField BETWEEN #11/01/2007# AND #11/30/2007#
 
Back
Top