Hello, I have data that I am exporting to a text file, and it contains a couple of datetime fields. I do not want those exported using the typical SAS format (30JUN2022:15:23:34.760000). Instead, I would like to have the 'date' portion in the YYYYMMDD format: (2022-06-30 15:23:34.760000) How do I modify this code to get the correct output format? Thanks! Barb proc export data=client.incrmtl outfile = "&filepath/incrmtl.txt" dbms=tab replace ; putnames=yes; run; data _null_; %let _EFIERR_ = 0; %let _EFIREC_ = 0; file '/sasem/gbmkuser/client/incrmtl_data.txt' delimiter='09'x DSD DROPOVER lrecl=32767; if _n_ = 1 then do; put "CRET_TS" ; end; set CLIENT.INCRMTL end=EFIEOD; format CRET_TS datetime26.6 ; do; EFIOUT + 1; put CRET_TS @; ; end; if _ERROR_ then call symputx('_EFIERR_',1); if EFIEOD then call symputx('_EFIREC_',EFIOUT); run;
... View more