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
Describe 5 ways to do a “table lookup” in SAS?
Name and describe few sas character functions that are used for data cleaning in brief.
What is data _null_?
How can you limit the variables written to output dataset in data step?
Enlist the syntax rules followed in sas statements.
List out some key concept of SAS
what is intially documentation in sas?
What is the work of tranwrd function?
where to use sas business intelligence? : Sas-bi
what is sas application server? : Sas-di
What is the use of %include statement?
What is SAS?
What would be the result of the following SAS function (given that 31 Dec, 2000 is Sunday)?
what r the job openings SAS for fresher graduates !
What are the data types that sas contain?