Is there a way to include dates greater than last Friday into this where statement.
where expiry = '31DEC9999:23:59:59'dt;
Thanks
So any time expiry is greater than 23:59:59 on the last Friday ... which is the same as any date-time greater than or equal to Saturday at 00:00:00, this should do it.
where expiry >= intnx('dtweek.7',datetime(),0,'b');
Are you talking specifically about Friday, May 1, 2020? Or do you want code that automatically figures out what date last Friday was?
Is EXPIRY a date variable or a date-time variable?
So any time expiry is greater than 23:59:59 on the last Friday ... which is the same as any date-time greater than or equal to Saturday at 00:00:00, this should do it.
where expiry >= intnx('dtweek.7',datetime(),0,'b');
If that obnoxious value is to indicate one that is not actually recorded then likely you should be using SAS Missing values.
Otherwise also sorts of "except when the value is this not actually the right value but we put it in anyway".
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 16. Read more here about why you should contribute and what is in it for you!
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.