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 is the difference between floor and ceil functions in sas? : Sas-administrator
What is the difference between using drop = data set option in data statement and set statement?
What is the maximum length of the macro variable?
How to sort in descending order?
What is the purpose of _character_ and _numeric_?
What are the five ways to do a table lookup in sas? : sas-grid-administration
Explain the purpose of substr functions in sas programming.
What Proc glm does?
what is proc Index? and what is proc document?
explain the difference between alternate key, business key, foreign key, generated key, primary key, retained key and surrogate key ? : Sas-di
why is a stop statement needed for the point=option on a set statement? : Sas programming
Are you sensitive to code walk-throughs peer review or QC review?
Mention sas system options to debug sas macros.
how are numeric and character missing values represented internally? : Sas programming
What are the difference between ceil and floor functions in sas?