BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
Sathiskumar_D
Obsidian | Level 7

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.

1 ACCEPTED SOLUTION

Accepted Solutions
art297
Opal | Level 21

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

 

View solution in original post

4 REPLIES 4
art297
Opal | Level 21

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

 

Tom
Super User Tom
Super User

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')
Reeza
Super User

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. 

 

Sathiskumar_D
Obsidian | Level 7

thanks.

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register now!

How to Concatenate Values

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 4 replies
  • 795 views
  • 5 likes
  • 4 in conversation