Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.
| FEATURES: | DAY and WEEKDAY Functions |
The SAS System contains functions to compute day of the week and day of the month from a SAS date. It is easy to confuse the two. The DAY function returns a number from 1 to 31 which represents the day of the month corresponding to a given date; the WEEKDAY function returns a number from 1 to 7, corresponding to the day of the week. Suppose you want to chart the frequency of hospital admissions by day of the week and day of the month using the HOSP data from Example 1. Here is the program: