Command Reference : Function Reference : Function Reference: W
  
 
@weekday
 
Day of the week of the observation.
Syntax: @weekday
Return: series
Returns the day of the week (1–7) associated with each observation in the workfile (Monday–Sunday).
If the workfile is of lower than daily frequency, the day of the week will be first day of the period.
If the workfile is undated, observations will be set to -1.
Examples
series dt = @weekday
saves the day of the week into the series DT.
The command
workfile d7 2020 2022
smpl if @weekday < 7
creates a seven day workfile and sets the sample to exclude Sundays.
Cross-references
See also @day, @hour, @hourf, @minute, @month, @seas, @second, and @weekday.