Identify Weekdays

  • Thread starter Thread starter Chris
  • Start date Start date
C

Chris

I need a query to identify missing weekdays is a list of
dates in a table. I can't write a wuery to identify just
missing dates because I need to excluded weekends.

How should I do this?

-Chris
 
Hi,


A possible solution is to get all the days, then, exclude the Saturdays and the Sundays with a
simple WHERE clause

WHERE WeekDay(MyDate, 1) IN (2, 3, 4, 5, 6)


Another possibility is to group by week number, and pick us those week having a count of day <>
5:


SELECT DatePart("ww", MyDate), Min(MyDate), Max(MyDate)
FROM Somewhere
GROUP BY DatePart("ww", MyDate)
HAVING COUNT(*) <> 5

That will return you the weeks with a problem (week number, first date known, last date known in
that week)



Hoping it may help,
Vanderghast, Access MVP
 
Back
Top