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
Assuming {et} is randomly drawn from N(0,1) and e0 = 0, generate 200 observations of xt = et − 0.5e(t−1) and draw a line graph of xt.
What are the functions which are used for character handling functions?
How can I remove header from output data set?
Give e an example of..
I have a dataset concat having a variable a b & c. How to rename a b to e & f?
What is SAS?
If you were told to create many records from one record, show how you would do this using array and with proc transpose?
what is the primary data source for the wrs? : Sas-bi
Mention what is PROC in SAS?
What are the difference between ceil and floor functions in sas?
Explain proc univariate?
I have a dataset concat having variable a b & c. How to rename a b to e & f?
Hi Friends, Am Priya,new to your forum. am looking for Interview questions on SAS Platform Administration. I searched everywhere but I couldn't find them,please can anyone help me with complete interview questions normally everyone will face in the interviews on SAS Administration. am really facing problems in the interviews,am not able to answer any of their questions. I would really appreciate all your help if you can email the complete Interview Questions to priyafeb84@gmail.com Kindly awaiting for your reply with eager
why is sas data integration studio important? : Sas-di
Hi, Does anybody has lastest SAS certification(base, adv., clinical)dumps,if anybody has please email me at mailtorajani76@gmail.com. Thanks