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

hackathon24-white-horiz.png

The 2025 SAS Hackathon Kicks Off on June 11!

Watch the live Hackathon Kickoff to get all the essential information about the SAS Hackathon—including how to join, how to participate, and expert tips for success.

YouTube LinkedIn

Creating Custom Steps in SAS Studio

Check out this tutorial series to learn how to build your own steps in SAS Studio.

Find more tutorials on the SAS Users YouTube channel.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 3 replies
  • 1301 views
  • 0 likes
  • 3 in conversation