Hi,
I have pulled out the date in this format:
DATE9.
And then was also able to convert into YYMMN.:
202006
But my ultimate goal is to get the following numeric date format:
20200600
That's how data is available.
Thanks in Advance.
Dates, by definition,cannot have a day of the month of 00.
So, you could add the zeros on the end via concatenating character strrings
want = cats(put(datevariable,yymmn6.),'00');
Dates, by definition,cannot have a day of the month of 00.
So, you could add the zeros on the end via concatenating character strrings
want = cats(put(datevariable,yymmn6.),'00');
One way to create such a dangerous value is a custom format:
proc format; picture dayzero (default=8) low-high = '%Y%0m00' (datatype=date) ; run; data _null_; date = '05Jun2010'd; put date dayzero.; run;
but I have a suspicion that you may be leaving something out.
April 27 – 30 | Gaylord Texan | Grapevine, Texas
Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and lock in 2025 pricing—just $495!
Still thinking about your presentation idea? The submission deadline has been extended to Friday, Nov. 14, at 11:59 p.m. ET.
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.