Returns the day of the week from a SAS date value
Category: Date and Time
WEEKDAY ( date )
date
specifies a SAS expression that represents a SAS date value.
The WEEKDAY function produces an integer that represents the day of the week, where 1=Sunday, 2=Monday, , 7=Saturday.
SAS Statements | Results |
---|---|
x=weekday('16mar97'd); put x; | 1 |