Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

We want to merge file A and B. File A has variable age,
file B provide birthdate. How to merge the data according
to age in file B

Answer Posted / vishal

Calculate age in dataset B by using the following code:
data ages;
set b;
retain current;
if _n_=1 then current=today();
format bday current worddate20.;
age=int(intck('month',bday,current)/12);
if month(bday)=month(current) then
age=age-(day(bday)>day(current));
run;

Source: http://support.sas.com/kb/24/567.html

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are the data types that sas contain?

1246


what are 5 ways to perform a table lookup in sas? : Sas-administrator

1296


what are the types of interactive display types? : Sas-bi

1143


for what purpose would you use the retain statement? : Sas programming

1143


what can you learn from the sas log when debugging? : Sas programming

1136


which date function advances a date, time or datetime value by a given interval? : Sas programming

1094


Explain what is SAS informats?

1132


i want for interview question & answer plz it need immediate send t my mail raviprakashmot@gmal.cm

2427


Approximately what date is represented by the SAS date value of 730?

1269


describe about metadata object? : Sas-di

1120


For a user to have access to a standard workspace server, is internal authentication alone is sufficient? : sas-grid-administration

1056


What will calendar procedure do?

1114


how does sas handle missing values in formats? : Sas programming

1186


where to use sas business intelligence? : Sas-bi

1160


what is sas business intelligence? : Sas-bi

1264