09-26-2013 12:22 AM
Hi people of the SAS procedures community.
I am a v new student to SAS and feel caught in the headlights while having my toenails pulled! I believe it gets better........
Anyway after a few hours I need help, pls excuse if this is such a painfully basic question;
Have date of birth(dob) and date of acceptance(doa) into a program. Some of the patients were born before 1960 so I am getting negative values when I calculate their age at date of acceptance. Would be eternally grateful for any guidance.
input dob mmddyy9. doa mmddyy9.
Yours in eternal indebtedness
09-26-2013 12:42 AM
Welcome to the wonderful world of SAS.
I have created the following to replicate what you are seeing.
FORMAT DOA DOB DATE9.;
INPUT DOAATE9. DOBATE9.;
The results this achieves are what you would expect I suspect. Is there a chance that the DOA is larger than the DOB in the circumstances where you have witnessed negative resutls?
If you post an example of the data you are accessing it will assist us in helping you.
09-26-2013 01:22 AM
Thank you very much for your prompt response. And YES I have just noticed that some years are being read incorrectly eg 1914 has been read as 2014 which of course would make the difference negative in fact it is only years less than 1919 that are been converted to 2000's and then have negative values. Oh boy am I missing something really important here?
Gratefully appreciate your guidance.
Need further help from the community? Please ask a new question.