I have a bunch of data from the Electronic Medical Record, and I am trying to create two cohorts of patients: those that had a time of death before July1, 2023 at midnight, and after. I have tried and tried, and keep failing. The variable "Time_of_Death" is a numeric DateTime16 variable. My Code is: DATA PallImpt.Cohorts;
SET PallImpt.Source;
IF Time_of_Death < '01JUL2023'd then Cohort = 1;
IF Time_of_Death > '01JUL2023'd then Cohort = 2;
else cohort = 3;
run However, when I look at the results, I get only cohorts 2 and 3 (if missing), but the dates that should be a "1" are a "2". What am I doing wrong?
... View more