Skip to main content

I am running a long workflow from Order to Shipment and each stage has specific number of days assigned to complete their task. I am using this table to calculate Target Completion date for each step(or Task) in the workflow.

 

I take current Date/Time and Use Add Days functtion to Add number of days assigned for the next Task and move to next Step.

 

The problem I am experiencing with ADD DAYS function is that it adds Calendar Days to the Date and sometimes task deadlines fall on a Saturday or Sunday which is not acceptable. We just want to make sure it always add Business days to a date instead of calendar days.

 

Need helpf, if there is a different function I shall use or a an app?

 

Thanks

Good day THeer


 


I hope you find the following helpful.


“Set a target completion date based on work days not calendar days”: https://community.k2.com/t5/K2-Five/Set-a-target-completion-date-based-on-work-days-not-calendar/m-p/108426,


Working Hours: https://help.k2.com/onlinehelp/K2Five/UserGuide/5.3/default.htm#K2-Management-Site/Workflow_Server/Working-Hours.htm.


 


Best,


Sunrise


Hello  @THeer,


 


You can create a stored procedure for it, then use SmartObject to call the stored procedure. 


Here's a SQL solution I found on stackoverflow:


 


https://stackoverflow.com/questions/10330836/how-to-count-date-difference-excluding-weekend-and-holi...


 


This can also help you go about solving your problem.


https://community.k2.com/t5/K2-Five/Subtract-months-from-date/td-p/110463u


 


Using Business Days


https://community.k2.com/t5/K2-Five/Set-a-target-completion-date-based-on-work-days-not-calendar/td-p/108426/page/3


 


I also think you can go about using expressions:


https://help.k2.com/onlinehelp/K2Five/UserGuide/5.1/default.htm#Create/Views/ControlExpressions.htm


 


Enjoy.


 


 


 


 


 


Reply