Chapter Contents

Previous

Next
WEEKDAY

WEEKDAY



Returns the day of the week from a SAS date value

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


Chapter Contents

Previous

Next

Top of Page

Copyright 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.