Basic Functions: WEEKDAY
The WEEKDAY function returns an integer that represents the day of the week. The usefulness of this function is in identifying weekends in a series of dates.
It is straightforward to use the filldown functionality of Openoffice Calc to create a column of consecutive dates. We can use the WEEKDAY function to only include the days of the week we want - for example excluding weekends.
The arguments to the function are :
WEEKDAY(Number; Type)
where
- Number, as a date value, is a decimal for which the weekday is to be returned.
- Type determines the type of calculation. For Type =1, the weekdays are counted starting from Sunday (this is the default even when the Type parameter is missing). For Type =2, the weekdays are counted starting from Monday =1. For Type = 3, the weekdays are counted starting from Monday = 0.
In the example below, we use the WEEKDAY function to identify weekend days.

We now use the WEEKDAY function to create a column of dates that exclude the weekends. An alternative (but similar) approach is shown

The sheet for this example can be downloaded here