Hi All
So this is a bit of a wierd occurance. I am used to the intck function returning a missing value if one of the two dates are missing. But in an excersice I'm busy with, it returns a zero. I can't understand why. I moked up a little dummy data set as well to test, and then it returns a missing value.
TAT = intck('minute', FIRST_APP_SUBMISSION_DATE, First_Action_Datetime);
both variables are datetime22.3
I'd really appreciate some insight.
GD
Do you have a RETAIN on TAT ? or maybe some other statement that damage TAT value ?
Can you post your full code or log ?
options missing='.' ;
You should have a
NOTE: Missing values were generated as a result of performing an operation on missing values. Each place is given by: (Number of times) at (Line):(Column).
in your log that points to the intck call. If not, then the missing value was somehow "calculated away" before that.
If the NOTE is there, then you might have options missing set to a non-default value, or TAT was manipulated after the function call. This could even happen by TAT being present in a dataset where you don't expect it.
*facepalm* sorry guys....
I did something idiotic....just after the calculation I reset the TAT variable to 0 if its missing...
TAT = intck('minute', FIRST_APP_SUBMISSION_DATE, First_Action_Datetime);
ind_2pm = (timepart(FIRST_APP_SUBMISSION_DATE) <='14:00:00't);
if TAT < 0 then do;
neg_TAT = TAT;
TAT = 0;
end;
thnx again...
SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.