Jump to content
Sign in to follow this  
elvis_impersonating_penguin

number of business days

Recommended Posts

ok.. I am pretty sure I have seen this before, but I am unable to find it.

I have two date fields, AssignDate and CompleteDate. What I need is a calculation that returns the difference (in days) between these dates, but only accounting for business days (Monday through Friday).

using Filemaker 6.

Share this post


Link to post
Share on other sites

ok.. i guess i should have looked harder. I just was able to find what I was looking for on databasepros website with there "Work days" files. I never found anything because I only searched for the phrase "Business Days".. anyway here is the calc i ended up with. if anyone sees any problems let me know, because I am only half sure how it works.

Thanks

Rick

If(not IsEmpty(PJCompleteDate),

Int((PJCompleteDate + Case(DayofWeek(PJCompleteDate) = 1, 1, DayofWeek(PJCompleteDate) = 7, 2) - PJAssignDate + Case(DayofWeek(PJAssignDate) = 1, 1, DayofWeek(PJAssignDate) = 7, 2)) / 7) * 5 +

Mod(PJCompleteDate + Case(DayofWeek(PJCompleteDate) = 1, 1, DayofWeek(PJCompleteDate) = 7, 2) - PJAssignDate + Case(DayofWeek(PJAssignDate) = 1, 1, DayofWeek(PJAssignDate) = 7, 2), 7) -

Case(DayofWeek(PJCompleteDate + Case(DayofWeek(PJCompleteDate) = 1, 1, DayofWeek(PJCompleteDate) = 7, 2)) < DayofWeek(PJAssignDate + Case(DayofWeek(PJAssignDate) = 1, 1, DayofWeek(PJAssignDate) = 7, 2)), 2)

,"")

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×

Important Information

By using this site, you agree to our Terms of Use.