BookmarkSubscribeRSS Feed
Cullima
Calcite | Level 5
I have an EG project that uses the intck function to create a new variable which calculates the number of 'weekdays' between two date variables in the source table. However, I need the result to take into account any public holidays which might fall between these two dates. This is something we have previously done in Excel using (e.g.) =NETWORKDAYS(A3,A4,Holidays), which was pretty straightforward. How can I acheive the same result in SAS Enterprise Guide or DI Studio?
3 REPLIES 3
Doc_Duke
Rhodochrosite | Level 12
One way might be to use Peter Crawford's program on SAS-L

http://www.listserv.uga.edu/cgi-bin/wa?A2=ind9909d&L=sas-l&F=&S=&P=6817

Not as pretty as a function. You'd have to do it in a code task, but it will work.

Doc Muhlbaier
Duke
Jay
Calcite | Level 5 Jay
Calcite | Level 5
Here's a link to a SAS Sample / note showing exactly what your trying to do:

http://support.sas.com/kb/26/044.html
Cullima
Calcite | Level 5
Many thanks for your responses. Can someone please explain to me how I would go about applying the code to my EG project, given that I have two columns in my table, DATE_MADE and TEST_DATE, and want to create a new column which will calculate the number of holidays between the two with a view to taking this off the result of my intck function to obtain the total working days. I am not overly experienced in SAS code so would appreciate as much advice as possible.

Thanks

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

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