Desktop productivity for business analysts and programmers

Calculating Business/Working days within EG or DI Studio

Reply
Contributor
Posts: 33

Calculating Business/Working days within EG or DI Studio

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?
Valued Guide
Posts: 2,111

Re: Calculating Business/Working days within EG or DI Studio

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
Contributor Jay
Contributor
Posts: 24

Re: Calculating Business/Working days within EG or DI Studio

Here's a link to a SAS Sample / note showing exactly what your trying to do:

http://support.sas.com/kb/26/044.html
Contributor
Posts: 33

Re: Calculating Business/Working days within EG or DI Studio

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
Ask a Question
Discussion stats
  • 3 replies
  • 157 views
  • 0 likes
  • 3 in conversation