I have reduced the problem to something that illustrates the anomaly more clearly. :
data today;
b = today();
DayofTheWeek=weekday(b);
put b = date.;
format DayOfTheWeek DOWNAME9.;
run;
proc print data=today;
run;
The result is off by a day. This example uses the system date, but for...
When I run the following code, it works fine:
libname learn 'C:\books\learning';
data frequency;
set learn.hosp;
DayOfTheWeek = weekday(AdmitDate);
monthOfTheYear = month(AdmitDate) ;
year = year(AdmitDate);
run;
proc freq data=frequency;
tables DayOfTheWeek monthOfTheYear year;
format...
Suppose your datalines are not quite even, due to extra spaces on some lines. e.g.
01/03/1950 01/03/1960 03Jan1970
05/15/2000 05/15/2002 15May2003
10/10/1998 11/12/2000 25Dec2005
How can you input this?
For example,
data ThreeDates;
input COMPBL(Date1) mmddyy10...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.