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

What would be the value of month at the end of data step execution and how many observations would be there?

1232


name the scheduler for scheduling job and explain the scheduler? : Sas-di

1093


What is maximum storage capability of SAS?

1486


Hi,by usining ptf how we have to combine (likr merge)10 datasets at a time in the oracle database(and write a macro code also)?Like this i have a douts a lot if you dont mind may please send one text mail for me(madhusudhanap16@gmail.com)?

1737


How do you connect the desktop application to metadata server? : sas-grid-administration

1147


What do you know about symput and symget?

1318


What does proc print, and proc contents are used for?

1220


Of all your work, where have you been the most successful?

4715


What is the SAS data set?

1175


I have a dataset concat having variable a b & c. How to rename a b to e & f?

1078


Mention sas system options to debug sas macros.

1237


Describe crosslist option in tables statement?

1265


If you need the value of a variable rather than the variable itself what would you use to load the value to a macro variable? : sas-macro

1120


Give some ways by which you can define the variables to produce the summary report (using proc report)?

1134


describe the interaction table in sas di? : Sas-di

1076