Syntax, WEEKDATEw.
format:
WEEKDATEw.
The WEEKDATEw.
format writes date values in the form day-of-week, month-name
dd, yy (or yyyy).
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;
format datein dateout weekdate17.;
run;
FORMAT Statement
|
Result
|
---|---|
format datein weekdate3.; |
Mon
|
format datein weekdate6.; |
Monday
|
format datein weekdate17.; |
Mon, Apr 5, 2009
|
format datein weekdate21.; |
Monday, April 5, 2009
|
Syntax, WORDDATEw.
format:
WORDDATEw.
The WORDDATEw.
format writes date values in the form month-name
dd, yyyy.
Note: If the w value
is too small to write the complete month, SAS abbreviates as needed.
|
proc print data=perm.aprbills;
format datein dateout worddate12.;
run;
FORMAT Statement
|
Result
|
---|---|
format datein worddate3.; |
Apr
|
format datein worddate5.; |
April
|
format datein worddate14.; |
April 15, 1999
|
options yearcutoff=1926;
data work.aprbills;
infile aprdata;
input LastName $8. @10 DateIn mmddyy8. +1 DateOut
mmddyy8. RoomRate 6. @34 EquipCost 6.;
Days=dateout-datein+1;
RoomCharge=days*roomrate;
Total=roomcharge+equipcost;
format datein dateout worddate12.;
run;
proc print data=work.aprbills;
run;