Skip to Content
avatar image
Former Member

How To Add Days To Date Excluding Weekends using sql query

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.
Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • 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?

    Regards,

    Johan

    Add comment
    10|10000 characters needed characters exceeded