I am writing a check to ensure that the age of the participant of a clinical study is consistent with the date of birth(DOB) and the enrolment date(ENROLDATE).I tried using substr() to get the year portion of DOB and substract it from the year portion of ENROLDATE but it is not working.This is the code:
dob=10/08/1987
enroldate=03/05/2011
(substr(dtoc(enroldate),7,4)) - (substr(dtoc(dob),7,4))
Could anyone help me with this please.
Thankyou in advance.
Yanx
dob=10/08/1987
enroldate=03/05/2011
(substr(dtoc(enroldate),7,4)) - (substr(dtoc(dob),7,4))
Could anyone help me with this please.
Thankyou in advance.
Yanx