BookmarkSubscribeRSS Feed
VanessaP
Calcite | Level 5

I need to select renewal dates a month and a day from now as part of an automated process that I will create as a process node in SAS Customer Intellligence Studio.   

For example, today is May 11th 2016, so I want to find all renewal dates of June 12th 2016.  

I realise I am going to have a problem in February when I will miss some dates.  Has anyone overcome this problem?   For various reasons, I can't simply use 30 days in the future or 31 days in the future.

Thanks

Vanessa

3 REPLIES 3
Reeza
Super User

Use the intnx function.

 

where date = intnx('month', today()+1, 1, 's')

Astounding
PROC Star

I think you'll need a slight variation:

 

cutoff_date = intnx('month', today(), 1, 's') + 1;

 

To address your question about different end-of-month values, SAS does have some logic built into the INTNX function to address these cases.  But you'll have to look through some examples to see if SAS handles it the way you would like.  Here's a good starting point:

 

http://support.sas.com/documentation/cdl/en/lefunctionsref/63354/HTML/default/viewer.htm#p10v3sa3i4k...

 

Good luck.

Reeza
Super User

The trick is to match your business rules. INTNX allows you variations to get end of month value, using an interval of 0, with end or beginning option for example. You haven't specified the rules so we can't help beyond this, but hopefully it gets you started. 

 

 

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!

SAS Enterprise Guide vs. SAS Studio

What’s the difference between SAS Enterprise Guide and SAS Studio? How are they similar? Just ask SAS’ Danny Modlin.

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
  • 3 replies
  • 1655 views
  • 0 likes
  • 3 in conversation