Hello,
I'm working with SAS 9.3 and having trouble. I am trying to figure out the age of people by subtracting everyone's date of birth from their interview date. Here is the syntax I have created in order to create the bday and interview variables along with the error messages that are haunting me.
bday = mdy (abthmo abthdy abthyr) ;
------
388
202
----
71
interv = mdy (pintmo pintda pintyr) ;
------
388
202
ERROR 388-185: Expecting an arithmetic operator.
ERROR 202-322: the option or parameter is not recognized and will be ignored.
ERROR 71-185: The MDY function call does not have enough arguments.
You aer missing commas in your MDY function. Should be.
bday=mdY(abthmo,abthdy,abthyr);
same for your interview day
You aer missing commas in your MDY function. Should be.
bday=mdY(abthmo,abthdy,abthyr);
same for your interview day
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.