Skip to Content

How To Add Days To Date Excluding Weekends using sql query

May 14 at 07:09 AM


avatar image
Former Member

Please help me out in finding the solution for the below requirement:

Date Calculation:

  • This date should be auto- calculated using the new buffer days field using workdays (i.e. 10 days = 10 workdays)

Calculated Date = Confirmed Delivery Date + “Supplier Delivery Leadtime Buffer (Days)”

Confirmed Delivery Date and Supplier Delivery Leadtime Buffer (Days) is a User Defined field (UDF) from Document level

Note: Date should be calculated by excluding weekends

For Ex:

  • 10 business days = approximately 2 calendar weeks;
  • 15 business days = approximately 3 calendar weeks.
10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

1 Answer

Johan Hakkesteegt May 14 at 09:58 AM

Hi Ramya,

Please have a look at this question and the suggested solutions on Stackoverflow.

Also, how do you intend to take holidays into account?



10 |10000 characters needed characters left characters exceeded