How to convert a given date value into SAS date
Answer Posted / arish kumar
e.g the date is '05/09/2007'
we can use the input function to convert this string into SAS date i.e.
date='05/09/2007'
sasdate=input(date,mmddyy10.);
Also, we can use mdy function.For this first use substr function.
m=substr(date,4,2);
d=substr(date,1,2);
y=substr(date,7,4);
sasdate=mdy(m,d,y);
| Is This Answer Correct ? | 21 Yes | 3 No |
Post New Answer View All Answers
What system options would you use to help debug a macro? : sas-macro
What is the difference between one to one merge and match merge? Give an example.
How do you control the number of observations and/or variables read or written?
What are the statements in proc sql?
Give e an example of..
what are the considerations when picking a SAS/STAT procedure?
what is sas metadata repository? : Sas-bi
where are dashboard components are created and maintained? : Sas-bi
How are numeric and character missing values represented internally?
How does proc sql work?
What are the new features included in the new version of SAS Programming Language?
What is the difference between input and infile statement?
What are the best sas programming practices for handling very large datasets? : sas-grid-administration
how to read the variables in sas? : Sas-administrator
How do you connect the desktop application to metadata server? : sas-grid-administration