PrevDayOfWeek(Date date, Numeric weekday)
Returns the date of the previous specified weekday before the given date.
Parameters
- date
- The date to start.
- weekday
- The numeric value representing the weekday (e.g. 0=Sunday, 1=Monday, etc.).
Returns
Date
Remarks
The function returns the same day if the specified weekday matches the given date.
Examples
PrevDayOfWeek([Date Shipped] - 1d, 3)
returns the last Wednesday that occurs before the date in the "Date Shipped" column.PrevDayOfWeek(#2013-03-20#, 5)
returns the last Friday date, 03/15/2013.