WEEKDATEw. Format

Writes date values as the day of the week and the date in the form day-of-week, month-name dd, yy (or yyyy).

Category: Date and Time
Alignment: Right

Syntax

WEEKDATEw.

Syntax Description

w

specifies the width of the output field.

Default 29
Range 3–37

Details

The WEEKDATEw. format writes SAS date values in the form day-of-week, month-name dd, yy (or yyyy):
dd
is an integer that represents the day of the month.
yy or yyyy
is a two-digit or four-digit integer that represents the year.
If w is too small to write the complete day of the week and month, SAS abbreviates as needed.

Comparisons

The WEEKDATEw. format is the same as the WEEKDATXw. format except that WEEKDATXw. prints dd before the month's name.

Example

The example table uses the input value of 19158, which is the SAS date value that corresponds to June 14, 2012.
SAS Statement
Result
 
----+----1----+----2
put date weekdate3.;
Thu
put date weekdate9.;
 Thursday
put date weekdate15.;
Thu, Jun 14, 12
put date weekdate17.; 
Thu, Jun 14, 2012

See Also

Functions:
JULDATE Function in SAS Functions and CALL Routines: Reference
MDY Function in SAS Functions and CALL Routines: Reference
WEEKDAY Function in SAS Functions and CALL Routines: Reference