Hi,
if i have a variable A as
A
20-Aug-1989
87
12-Feb-2018
etc.,
how can i get the year 87 to 1987.
Please help
Hi,
If A is a SAS variable, then what type is it and what format does it have, if any?
Regards,
Amir.
Post test data in the form of a datastep!!
Now we have to go through the stages of asking you questions about what your data looks like.
Is it a date?
Is it character?
Is 87 really 1987? What if you have 18, is that 1918 or 2018?
If its text which I suspect, then:
a=ifc(lengthn(a)=2,cats("19",a),a);
But I would go back to the source and get them to fix it to be safe.
Okay
Thank you so much:)
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.