Forum Discussion
- Marsha_R
Champion Level 3
We need a little more information. An example of what you are looking for would be very helpful.
- NisHeraValued Contributor
If you assume all Monday to Fridays are business days , you may use below examples
http://www.visualbasicscript.com/How-do-find-date-difference-for-only-business-days-m36903.aspx
http://stackoverflow.com/questions/22519605/add-3-or-5-days-to-now-excluding-weekendshttp://www.vbforums.com/showthread.php?683895-Calculating-WORKING-DAYS-(Mon-Fri)https://gist.github.com/sholsinger/921871
But if this thing involved with holidays , would get tricky
- BabuluContributorHi I want to 7 businessdays. Suppose I am entering date is 24/10/2016 I.e Monday it count next day onwards I.e 25/10/2016( Tuesday) to 7 businessdays in between any holidays comes or it will skip next day or Saturday or Sunday comes it will skip goto next day
- AlexKaras
Champion Level 3
Hi,
As per NisHera's reply, you may try to implement some pretty basic and generic approach. Otherwise, this is non-trivial and very country-specific task. Do you really need it? For what? May some workaround be implemented? How this is handled by your tested application?
Even business day calculation might be non-trivial (e.g. Friday is usually a business day with Sunday been a weekend, but not in Israel where people do not (usually) work on Fridays but work on Sundays instead), not to speak about holidays which may be on a fixed days and exist for years (happy case) or may be calculated using some complex considerations (e.g. Easter holiday) and be added to/removed from the calendar depending on the internal goverment decisions of this or that country.