I am merging two datasets - one dataset has the date recorded as separate month and year variables. I want to convert these into a single variable for the date in the format mm.yyyy, to match the date variable in the second dataset.
Is this possible? Any advice is appreciated
You could use the following code:
[pre]
data i;
month=5;
year=2011;
date=MDY(month,01,year);
format date mmyyp8.;
run;
[/pre]
Sincerely,
SPR
April 27 – 30 | Gaylord Texan | Grapevine, Texas
Registration is open
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!