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 are the difference between ceil and floor functions in sas?
what is sas metadata server? : Sas-di
What do you code to create a macro? : sas-macro
Explain proc sort?
What is slibref?
What is the difference between one to one merge and match merge? Give an example.
how would you create multiple observations from a single observation? : Sas programming
What is program data vector (pdv)?
what is sas business intelligence? : Sas-bi
What is a method for assigning first.VAR and last.VAR to the BY group variable on unsorted data?
what do the pad and dim functions do? : Sas programming
Are you involved in writing the inferential analysis plan? Tables specfications?
What function CATX syntax does?
What can be the size of largest dataset in SAS?
what is hierarchy flattening? : Sas-di