DATA want;
SET have ;
FORMAT Open_Dt DATE9.;
Open_Dt= PUT (TAKE_UP_DATE_CD,YYMMDD10.) ;
RENAME DIFF =DIFF_AMT ;
RUN
can you please assist in converting this a numberic value to date format
expected outcome
Numbers like this look like dates to human, but are not dates to SAS. The conversion is
newdate=input(put(date,8.),yymmdd8.);
format new_date date9.;
What is the name of the variable that you wish to convert?
Give a few examples of the values that it currently has.
You get no information until you actually answer my questions.
Numbers like this look like dates to human, but are not dates to SAS. The conversion is
newdate=input(put(date,8.),yymmdd8.);
format new_date date9.;
You answered one question, but not the other. Without knowing the variable name you are talking about, we have to guess which variable you mean.
@PaigeMiller took a good guess. I suggest you try his solution. But be consistent in your choice of names for the new variable: new_date vs. newdate.
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.