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 are several options for creating reports in web report studio? : Sas-bi

1076


what has been your most common programming mistake? : Sas programming

1030


What is a macro routine?

2639


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

4621


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

1034


Briefly explain input and put function?

1030


How to read an input file in sas?

1093


What is substr function?

1116


What is the function of output statement in a SAS Program?

1008


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

1161


Explain how you can debug and test your SAS program?

943


what is the use of sas management console? : Sas-di

1033


What is the use of function Proc summary?

1210


How do you use the do loop if you don’t know how many times you should execute the do loop?

1210


Which command is used to save logs in the external file?

1027