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
Explain proc univariate?
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.
How might you use MOD and INT on numeric to mimic SUBSTR on character Strings?
How to include or exclude specific variables in a data set?
Name any two sas spawners? : sas-grid-administration
Mention few capabilities of sas framework.
what is ae onset date n what is RDS
What are pdv and it functions?
Have you used macros? For what purpose you have used? : sas-macro
What is substr function?
What is the difference between INPUT and INFILE ?
what is the difference between infile and input? : Sas-administrator
Give some examples where proc report’s defaults are different than proc print’s defaults?
How is character variable converted into numeric variable and vice versa?
what can you learn from the sas log when debugging? : Sas programming