BookmarkSubscribeRSS Feed
PavanKumar2
Fluorite | Level 6

Hi team,

 

I have Start Date as 10 th March 2019 and End Date as 20 th March 2019.

 

Result I am getting:

Difference in Days - 10 days

 

But 10 th march 2019 - sunday and  16 th march 2019 Saturday and 17 th march 2019 sunday. I want to eliminate Weekends.

 

Result I need :

 No of Business Days = 7 days.

 

Please Help me.

 

Regards,

Pavan.

1 REPLY 1
sotojcr
Obsidian | Level 7
data TEST;
format DAY1 DAY2 date9.;
DAY1= "10mar2019"d;
DAY2= "20mar2019"d;
DIFF = intck('WEEKDAY', DAY1, DAY2);
run;

In fact, it's 8 business days and not 7.

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!

Tips for filtering data sources in SAS Visual Analytics

See how to use one filter for multiple data sources by mapping your data from SAS’ Alexandria McCall.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 1 reply
  • 353 views
  • 0 likes
  • 2 in conversation