Skip to Content
0
Former Member
May 14, 2018 at 07:09 AM

How To Add Days To Date Excluding Weekends using sql query

839 Views

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.