elvis_impersonating_penguin Posted October 22, 2004 Posted October 22, 2004 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.
elvis_impersonating_penguin Posted October 22, 2004 Author Posted October 22, 2004 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) ,"")
Navigating Posted August 9, 2007 Posted August 9, 2007 You saved my life with this calc. Thanks! Sheryl
Recommended Posts
This topic is 6377 days old. Please don't post here. Open a new topic instead.
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 accountSign in
Already have an account? Sign in here.
Sign In Now