I was able to create a new variable called 'Age' which = number of years of age the person was at the time of symptoms onset using this code:
data Age;
set HospitalDays;
Age = (dateSymptoms - DOB);
format Age years.
run;
It worked perfectly! however, even when I used format Age years. the numbers are displayed as days from DOB to symptoms vs years.
Formats won't get the job done in this case. They can display dates as year, but your variable Age is not a date.
In an earlier thread, you said your lab asked you to use a specific function to do this. What function was it, and did you try that? If not, please try it.
Formats won't get the job done in this case. They can display dates as year, but your variable Age is not a date.
In an earlier thread, you said your lab asked you to use a specific function to do this. What function was it, and did you try that? If not, please try it.
Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.
Register today!ANOVA, or Analysis Of Variance, is used to compare the averages or means of two or more populations to better understand how they differ. Watch this tutorial for more.
Find more tutorials on the SAS Users YouTube channel.