Dear reader, I ran into a small issue..
I want to output date as a visible date in (in this case DATE9.) format and not as a numeric output. The format of AESTDT is DATE9. As an example 01DEC2021
My code for this example is Code: MSG='Onset Date - '||TRIM(AESTDT)||'- is available';
The output is this: Onset Date - 22974- is available
But what I want is Onset Date - 01DEC2021- is available
What can I do? Thanks so much for your help!
Try this
data test;
AESTDT = '01DEC2021'd;
MSG = 'Onset Date - '||TRIM(put(AESTDT, date9.))||'- is available';
run;
Try this
data test;
AESTDT = '01DEC2021'd;
MSG = 'Onset Date - '||TRIM(put(AESTDT, date9.))||'- is available';
run;
Great, this works... Thanks
Join us for SAS Innovate 2025, our biggest and most exciting global event of the year, in Orlando, FL, from May 6-9.
Early bird rate extended! Save $200 when you sign up by March 31.
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.