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
What would be the value of month at the end of data step execution and how many observations would be there?
name the scheduler for scheduling job and explain the scheduler? : Sas-di
What is maximum storage capability of SAS?
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)?
How do you connect the desktop application to metadata server? : sas-grid-administration
What do you know about symput and symget?
What does proc print, and proc contents are used for?
Of all your work, where have you been the most successful?
What is the SAS data set?
I have a dataset concat having variable a b & c. How to rename a b to e & f?
Mention sas system options to debug sas macros.
Describe crosslist option in tables statement?
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
Give some ways by which you can define the variables to produce the summary report (using proc report)?
describe the interaction table in sas di? : Sas-di