The question is from the Prep Guide.
targetyear=intnx('Year','05feb94'd,3)
I was anticipating the answer 05feb97.However, the value is 13515 i.e., January1,1997. Why is that so?
However, the same functin used on semiyear yield the value as expected.
Eg.
targetMonth=intnx('semiyear','01jan2001'd,1) and the answer is 01July2001.
If you don't include the allignment option, beginning is the default. That is what you got for year (jan 1) and semi-year (july 1)
Art, CEO, AnalystFinder.com
If you don't include the allignment option, beginning is the default. That is what you got for year (jan 1) and semi-year (july 1)
Art, CEO, AnalystFinder.com
It just did what you asked it to do. If you want it to find the same point in the interval you need to tell it that.
targetyear=intnx('Year','05feb94'd,3,'same')
INTNX() has 4 parameters, you've specified 3.
The fourth parameter tells it how to align the dates: beginning, same, end, middle.
The default is the beginning, which is being used.
thanks.
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 lock in 2025 pricing—just $495!
Still thinking about your presentation idea? The submission deadline has been extended to Friday, Nov. 14, at 11:59 p.m. ET.
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.