Apologies for the rather simplistic question. But I have a date set I generate in the code to reference.
REPORTDATE = intnx('Week',today(),-1,'E');
CW_END = intnx('Week',ReportDate,0,'E');
This gives me the most recent Saturday that passed for a report I generate. I need to be able to get this exact Date in the previous year. So in this case March 7 2020 is the date generated from above code. I need to get March 7 2019. I would use a hard coded calculation but that would mess up in Leap years like this year.
Thanks in advance!
oneyearago=intnx('year',cw_end,-1,'s');
Thanks so much!
April 27 – 30 | Gaylord Texan | Grapevine, Texas
Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and save with the early bird rate—just $795!
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.