gpt4 book ai didi

date - sas 日期 - 将 today() 转换为 yyyymmdd 格式

转载 作者:行者123 更新时间:2023-12-03 14:34:10 29 4
gpt4 key购买 nike

如何转换 SAS 日期,例如 "30JUL2009"d进入 YYYYMMDD格式(例如 20090730)?

所以例如:

data _null_;
format test ?????;
test=today();
put test=;
run;

会在日志中给我“test=20090730”...

最佳答案

data _null_;
format test yymmddn8.;
test=today();
put test=;
run;

YYMMDDxw. documentation

关于date - sas 日期 - 将 today() 转换为 yyyymmdd 格式,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/1207110/

29 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com