AnsweredAssumed Answered

Count Working Days

Question asked by user28271 on Jan 25, 2018
Latest reply on Jan 26, 2018 by jbrown

I often need to get only the work days between two date.

 

I found this a while ago. 

 

5 * Int ( ( EndDate - StartDate ) / 7 ) +Middle ( "0012345501234544012343340123223401211234010012340" ; 7 * (DayOfWeek ( StartDate ) - 1 ) + DayOfWeek ( EndDate) ; 1 )

 

It work mostly.  Occasionally there is an issue where it is off a day. 

Ran into an issue a while back with a leap year.

 

I would like to know two things:

 

Is there a better custom function?

How about user defined holidays?

 

Holidays would be great because my most common use is for vacation request.  Tell HR how many work days they are taking off.

Outcomes