count of days from 2 date columns EXCLUDING SATURDAY AND SUN

hello Friends.

I have this assignment where we need to capture performance day count from the difference of 2 date columns in the report. However, the count need to exclude the weekend( sat/sun) to reflect true contractor performance. For example we have contractor PROCESSING COMPLETE DATE and then there is RECEIVE DATE. We are on DB2. Let me know of any suggestion in terms of function/formula or any insight to handle this requirement. The max difference count on the current report could be as high as 400 days.
Happy spring to all of you folks. Cheers!
Nick


nickbhal (BOB member since 2007-04-03)

In first step find first Sat after FROM DATE. Then find Last Sat from TO DATE. Then you have four dates, now you can calculate days as per your requirement.


Rakesh_K :india: (BOB member since 2007-12-11)

This post may also help


MBTDC :us: (BOB member since 2007-12-28)

This post may help:


David P. :us: (BOB member since 2010-11-09)