Hi
I have a variable (hosp) containing a text that looks like this:
Admission date: 31aug2004 Reason: xxxxxxxxx
Discharge date: 16oct2004 xxxxxxxx
Admission date: 28oct2004 Reason: xxxxxxxxxxxxx
Discharge date: 09nov2004 Discharged xxxxxxxxx
Admission date: 09nov2004 Reason: xxxxxx
Discharge date: 05dec2004 Discharged xxxxxxx
Admission date: 05dec2004 Reason: xxxxx
Discharge date: 31dec2004
And then another variable (evt) that contains a text like "12dec2004"
So everything is stored as pure "text" in those variable
I need do write a code that would identify the dates in the variable (hosp) and then looks for the hospitalization period when the even occured, ie Admission date =< evt date =< discharge date
How can you do that please?
Regards
I have a variable (hosp) containing a text that looks like this:
Admission date: 31aug2004 Reason: xxxxxxxxx
Discharge date: 16oct2004 xxxxxxxx
Admission date: 28oct2004 Reason: xxxxxxxxxxxxx
Discharge date: 09nov2004 Discharged xxxxxxxxx
Admission date: 09nov2004 Reason: xxxxxx
Discharge date: 05dec2004 Discharged xxxxxxx
Admission date: 05dec2004 Reason: xxxxx
Discharge date: 31dec2004
And then another variable (evt) that contains a text like "12dec2004"
So everything is stored as pure "text" in those variable
I need do write a code that would identify the dates in the variable (hosp) and then looks for the hospitalization period when the even occured, ie Admission date =< evt date =< discharge date
How can you do that please?
Regards