Displaying Date and Time Values with Formats

SAS stores date and time values as numeric variables. Formats should be applied to the data so that meaningful date and time values are displayed in reports.

The WEEKDATEw. Format

Use the WEEKDATEw. format to write date values in a format that displays the day of the week, month, day, and year.
Syntax, WEEKDATEw. format:
WEEKDATEw.
The WEEKDATEw. format writes date values in the form day-of-week, month-name dd, yy (or yyyy).
  • dd is an integer between 01 and 31, representing the day.
  • yy or yyyy is an integer that represents the year.
Note: If the w value is too small to write the complete day of the week and month, SAS abbreviates as needed.
proc print data=perm.aprbills; ...

Get SAS Certification Prep Guide, 4th Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.