08-31-2012 07:43 AM
I am running one program in the database. But getting error in log window as
Invalid (or missing) arguments to the DATEPART function have caused the function to return a missing value.
How to get rid of it.
create table x as
select m.case_id, m.case_num,datepart(p.pat_dob) as pat_dob format =date9.
from master as m,
(select case_id, pat_dob from patient p where length(pat_dob_partial) in (11,17)) p
where m.case_id = p.case_id;
08-31-2012 08:58 AM
First, remove the correct and helpful statuses of your and my posts .. your question has not been answered.
I didn't ask if it was a datetime variable but, rather, whether it was a SAS datetime variable. Often people import data that contains a datetime variable, but the variable ends up in a SAS dataset as a character variable. If you run the following:
proc contents data=master;
what kind of variable does the system indicate pat_dob is?
Need further help from the community? Please ask a new question.