PDL, this is quite a hard one, because of all the differences among countries and possible exceptions. For example, are all ordinary weekdays (not saturday or sunday) workdays, or should for example Christmas and the 4th of July (for the US) excluded? Think about these questions first, then we can help. Good luck...
so you're only looking for NewDateFunction(Date1,Date2) right ??
i would use DateDiff to get the number of days between Date1 and Date2
then use a which-day-in-week (i know there is one in cf !!) function to know how far from a sunday/saturday i'm starting to count (and keep that difference stored somewhere)
then i guess (number_of_days modulo 7) * 5 + the_difference_you_stored is the answer
but it's rather an algorithm/mathematical advice you were looking for, NOT a cf one !!!! so this post shouldn't have been in the cf forum ... !
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.