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;
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With