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=work.aprhospitalbills;
format datein dateout weekdate17.;
run;
FORMAT Statement
|
Result
|
---|---|
format datein weekdate3.; |
Tue
|
format datein weekdate10.; |
Tuesday
|
format datein weekdate17.; |
Tue, Apr 3, 2018
|
format datein weekdate31.; |
Tuesday, Apr 3, 2018
|
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=work.aprhospitalbills;
format datein dateout worddate12.;
run;
FORMAT Statement
|
Result
|
---|---|
format datein worddate3.; |
Apr
|
format datein worddate9.; |
April
|
format datein worddate14.; |
April 3, 2018
|
data work.aprhospitalbills;
set cert.aprbills;
Days=dateout-datein+1;
RoomCharge=days*roomrate;
Total=roomcharge+equipcost;
format datein dateout worddate12.;
run;
proc print data=work.aprhospitalbills;
run;