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 / paul
proc format ;
value dat low-'31DEC1974'd=[date7.]
'01JAN1975'd-'31DEC1985'd="Disco Years"
'01JAN1986'd-high=[date9.];
run;
proc sql;
select date format=dat. from D1 ;
quit;
| Is This Answer Correct ? | 3 Yes | 0 No |
Post New Answer View All Answers
what is change analysis in sas di ? : Sas-di
Describe the function and untility of the most difficult SAS macro that you have written.
what other sas products have you used and consider yourself proficient in using? : Sas programming
Mention the difference between ceil and floor functions in sas?
How do you delete duplicate observations in sas?
what do you mean by data staging area? : Sas-di
how does sas handle missing values in functions? : Sas programming
what are the benefits of data integration? : Sas-di
How does SAS handle missing values in: assignment statements, functions, a merge, an update, sort order, formats, PROCs?
Have you used macros? For what purpose you have used? : sas-macro
How might you use MOD and INT on numeric to mimic SUBSTR on character Strings?
What are the 3 components in sas programming?
What are the different operating system platforms in which we can use sas? : sas-grid-administration
Do you know the features of sas?
Differentiate between ceil and floor functions.