I'm trying to convert datetime22.3 variable to ddmmmyy10. in proc sql, this is giving me ****** in the output column.
How can I get the correct values in the output column?
You need to convert original SAS DATETIME value (think of it as data type) to SAS DATE value using DATEPART()
function and apply appropriate format:
proc sql;
create table work.abc
as select DISTINCT a.Account_Id,
DATEPART(a.Billing_Dt) format ddmmyy10. as Bill_date
from abc table;
quit;