Previous Page | Next Page

Functions and CALL Routines

WEEKDAY Function



From a SAS date value, returns an integer that corresponds to the day of the week.
Category: Date and Time

Syntax
Arguments
Details
Examples

Syntax

WEEKDAY(date)


Arguments

date

specifies a SAS expression that represents a SAS date value.


Details

The WEEKDAY function produces an integer that represents the day of the week, where 1=Sunday, 2=Monday, ..., 7=Saturday.


Examples

SAS Statements Results
x=weekday('16mar97'd);
put x;
 
1

Previous Page | Next Page | Top of Page