There is a field containing a date. It needs to be
displayed in the format
"ddmonyy" if it's before 1975,
"dd mon ccyy" if it's after 1985, and
as 'Disco Years' if it's between 1975 and 1985.
How would you accomplish this in data step code? Using
only PROC FORMAT
Answer Posted / schuler
data formated(keep=datenew);
length datenew $10.;
set new;
if date<'31dec1974'd then datenew=put(date,date7.);
else if date>'31dec1984'd then datenew=put(date,date7.);
else datenew='Disco Year';
run;
proc print data=formated nobs;run;
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
name some data transformation used in sas di? : Sas-di
what is treatment emergent events and treatment emregent adverse event
what is the different between functions and procs that calculate the same simple descriptive statistics? : Sas programming
How necessary is it to be creative in your work?
Did you used proc test? when?
If you were told to create many records from one record, show how you would do this using array and with proc transpose?
how do you pull data from equifax?tell me the process?
What are the different operating system platforms in which we can use sas? : sas-grid-administration
Explain how merging helps to combine data sets.
explain about data integrator metadata reports? : Sas-di
how will you locate the sas platform applications? : Sas-bi
Approximately what date is represented by the SAS date value of 730?
Mention what is SAS data set?
what is ae onset date n what is RDS
how can you put a "trace" in your program? : Sas programming