data want;
chardate='20200214';
numdate=input(chardate,yymmdd8.);
format numdate yymmdds10.;
run;
To answer your question we need to see your actual code.
as SELECT DISTINCT
t2.ac,
t1.ext_ui
t1.vkonto,
t1.vkbez as sap_name,
t1.einzdat as dateto,
t1.auszdat as datefrom
FROM analytics_temp_user.List t2 inner join analytics_pm6.ALLSAPDATA t1
input(t1.einzdat,yyddmm8.) as dateto format=yymmdds10.,
You can replace the reference to the existing variable with the function call. Attach the format to control how the resulting date values are displayed.
SELECT DISTINCT
t2.ac
,t1.ext_ui
,t1.vkonto
,t1.vkbez as sap_name
,input(t1.einzdat,yymmdd8.) as dateto format=ddmmyy10.
,input(t1.auszdat,yymmdd8.) as datefrom format=ddmmyy10.
FROM analytics_temp_user.List t2
inner join analytics_pm6.ALLSAPDATA t1
Please do not show us the errors separated from the code. Please do show us the entire LOG for your PROC SQL step, with nothing chopped out, in the order that it appears in the LOG.
Please also help us out by formatting the log properly by copying it as text and pasting it into the window that appears when you click on the </> icon. PLEASE DO NOT SKIP THIS STEP. I no longer try to read logs that are not formatted properly.
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!
SAS' Charu Shankar shares her PROC SQL expertise by showing you how to master the WHERE clause using real winter weather data.
Find more tutorials on the SAS Users YouTube channel.