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...

How to convert a given date value into SAS date

Answer Posted / vinay

/*let date is '10/07/1985'/*
/*SAS CODING*/
data date;
input date $;
Var_Date=input(date,mmddyy10.);/*Apply format within input
function to convert text value to number value*/
/*now extract value of month,date and year through date
functions*/
m=substr(Var_Date,4,2);
d=substr(Var_Date,1,2);
y=substr(Var_Date,7,4);
sasdate=mdy(m,d,y);
cards;
10/07/1985
;
run;
proc print dtat=date;
run;

Is This Answer Correct ?    2 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Mention what are the data types does SAS contain?

1153


how will you locate the sas platform applications? : Sas-bi

1033


why is sas considered self-documenting? : Sas programming

1147


what are some differences between proc summary and proc means? : Sas programming

1130


explain the difference between proc means and proc summary?

1127


How would you define the end of a macro? : sas-macro

1094


What are the differences between sum function and using “+” operator?

1111


Have you used macros? For what purpose you have used? : sas-macro

1042


Difference between nodup and nodupkey options?

1195


what other sas products have you used and consider yourself proficient in using? : Sas programming

1115


What are the statements in proc sql?

1105


What are the five ways to do a table lookup in sas? : sas-grid-administration

1064


if the Id has more then two transcatiion then show the first observation, IF Id has only two observation then It show both the observation

1620


What is the use of %include statement?

1063


What is the work of tranwrd function?

1248