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
its
between 1975 and 1985. How would you accomplish this in
data step code? Using only PROC FORMAT.
Answer Posted / kamalan
proc format;
value datestyl low-'31dec1974'd = [date7.]
'01jan1975'd - '31dec1985'd = 'disco Years'
'01jan1986'd - max = [date9.] ;
Run;
proc print data = abc;
format dateval datestyl.;
Run;
| Is This Answer Correct ? | 6 Yes | 0 No |
Post New Answer View All Answers
Why double trailing @@ is used in input statement?
How to create list output for cross-tabulations in proc freq?
What is the basic structure of a sas program?
: and & modifiers.
Are you involved in writing the inferential analysis plan? Tables specfications?
What was the last computer book you purchased? Why?
What are the difficulties u faced while doing vital signs table or dataset?
What do you understand by the term Normal Distribution?
How does SAS handle missing values in: assignment statements, functions, a merge, an update, sort order, formats, PROCs?
how do you pull data from equifax?tell me the process?
what is operational data and operational system? : Sas-di
What does the RUN statement do?
if a variable contain dates like "2015/01"---"2015/12" (yymm) ,How to add day to those dates,if them month is jan then 31 if the month is feb then 28 so on ...
how to read the variables in sas? : Sas-administrator
hi all, I need the SAS DI DUMP(A00 260) for attending the certification. if any one have, pls provide it.Please Email to vrpotluri@hotmail.com. Thanks - Ramana