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".
Catch the best of SAS Innovate 2025 — anytime, anywhere. Stream powerful keynotes, real-world demos, and game-changing insights from the world’s leading data and AI minds.
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.