I have a dataset with variables empid and doj how to calculate retirement age?
Answer Posted / virat chary vadla
data joindates;
input empid$ doj date9.;
format doj is8601da.;
cards;
a101 01jan2000
a102 01aug2000
;
/*if retirement time is for 60 yrs then */
data ret_dates;
set joindates;
ret=intnx('year',doj,60,'same');
format ret doj is8601da.;
put 'for the empid--' empid 'retirement date is--' ret;
run;
Is This Answer Correct ? | 6 Yes | 0 No |
Post New Answer View All Answers
what are 5 ways to perform a table lookup in sas? : Sas-administrator
What does P-value signify about the statistical data?
I am preparing SAS Certified Advanced Programmer for SAS 9 in 2014. If anybody has the latest dumps for this exam, please mail me at dhiman.mukherjee@gmail.com
How do you delete duplicate observations in sas?
What are the parameters of scan function?
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 ...
In SAS explain which statement does not perform automatic conversions in comparisons?
what is the difference between: x=a+b+c+d; and x=sum (of a, b, c ,d);? : Sas programming
Describe a time when you were really stuck on a problem and how you solved it?
what is the difference between calculating the 'mean' using the mean function and proc means? : Sas programming
what are sas/access and sas/connect? : Sas programming
what is the purpose of _error_? : Sas programming
name the scheduler for scheduling job and explain the scheduler? : Sas-di
List down the reasons for choosing sas over other data analytics tools.
how would you create a data set with 1 observation and 30 variables from a data set with 30 observations and 1 variable? : Sas programming