D Douglas J. Steele Dec 7, 2007 #2 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)
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)
C CMM Dec 7, 2007 #3 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!
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!
D Douglas J. Steele Dec 7, 2007 #4 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#
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#