Weekday Only Calc

  • Thread starter Thread starter aMack
  • Start date Start date
A

aMack

I am generating reports for a customer based on activity for the previous 2
working days. There is no activity on weekends, therefore i need the query
results of: "[Arrival Date]=Now()-2" to exclude weekends.

Help.

Thanks
 
aMack said:
I am generating reports for a customer based on activity for the previous 2
working days. There is no activity on weekends, therefore i need the query
results of: "[Arrival Date]=Now()-2" to exclude weekends.


Try using:

DateAdd("d", - 2 + 2 * (WeekDay(Now(), 2) < 3), Now())

ir, if that's too cryptic:

DateAdd("d", - 2 - IIf(WeekDay(Now(), 2) < 3, 2, 0), Now())
 
Back
Top