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
Briefly explain input and put function?
What is the maximum length of the macro variable? : sas-macro
Are you sensitive to code walk-throughs peer review or QC review?
Which command is used to perform sorting in sas program?
Why double trailing @@ is used in input statement?
Name some categories in sas 9? : sas-grid-administration
In SAS explain which statement does not perform automatic conversions in comparisons?
what is the Population you used in your project, is it ITT or PP?
what is business intelligence? : Sas-bi
Explain why double trailing @@ is used in input statement?
what are _numeric_ and _character_ and what do they do? : Sas programming
I have a SCD Type 2 Dimention for Location In which A Sales Office in Having two Surrogate Keys just because of the change in it's Sales Group. SKey SalesGroup Sales Office BeginDate EndDate 280 SG1 SO1 01APR2000 01APR2010 281 SG2 SO1 02APR2010 31MAR2999 Now while loading the Fact, the Lookup ir returning SKey 280 for records before and after 01APR2010. I am not able to give WHERE condition in the Lookup Properties (TranDate between BeginDate and EndDate). Please help.
Can you explain the process of calendar?
In sas admin differentiate between roles and capabilities? : sas-grid-administration
what are all the reports you generated in your recent project?