Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在尝试将 datetime22.3 变量转换为 ddmmmyy10。在 proc sql 中,这在输出列中给了我 ******。
如何在输出列中获得正确的值?
您需要使用DATEPART()函数将原始 SAS DATETIME 值(将其视为数据类型)转换为 SAS DATE 值并应用适当的格式:
DATEPART()
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;