Hi everyone ...
I'd like to ask what I think is simple. I'm still learning SAS and am trying to clean up some "wordy" code. I'm looking for input from others on way that I can go about the same thing, but more efficiently. For example, here is a simple If-Then/Else.
My objective; I'm looking to take the READTIME variable from my flightdata data set and I only want to see observations where the READTIME happened yesterday, regardless of what yesterday is.
My code works perfectly fine, I'm just interested if anyone has any feedback on efficiency.
Would appreciate any feedback anyone has.
Thanks!
Kent
I'd like to ask what I think is simple. I'm still learning SAS and am trying to clean up some "wordy" code. I'm looking for input from others on way that I can go about the same thing, but more efficiently. For example, here is a simple If-Then/Else.
My objective; I'm looking to take the READTIME variable from my flightdata data set and I only want to see observations where the READTIME happened yesterday, regardless of what yesterday is.
Code:
data temp1;
set mylib.flightdata;
yesterday = today() - 1;
readdate_dpt = datepart(readtime);
if readdate_dpt = yesterday then output;
else delete;
run;
My code works perfectly fine, I'm just interested if anyone has any feedback on efficiency.
Would appreciate any feedback anyone has.
Thanks!
Kent