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.
Registration is now open for SAS Innovate 2025 , our biggest and most exciting global event of the year! Join us in Orlando, FL, May 6-9.
Sign up by Dec. 31 to get the 2024 rate of just $495.
Register now!
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.
Ready to level-up your skills? Choose your own adventure.