If you are unable to create a new account, please email support@bspsoftware.com

 

Framework Manager to calculate business days (no weekends+holidays)

Started by minh02, 01 Mar 2019 08:20:09 AM

Previous topic - Next topic

minh02

Hi everyone. I hope someone can help me. I have shipped date and delivered date. I need to find the total days that it took to ship minus weekends and holidays. I have tables that stores business days as 0 for not business day and 1 as business day, and a table that has Holiday as 0 for no holiday and 1 as a holiday.

dougp

Are you saying you have a Date table that looks something like this?

DateWeekDayNameBusinessDayHoliday
2018-12-31Thursday10
2019-01-01Friday11
2019-01-02Saturday00
2019-01-03Sunday00
2019-01-04Monday10


How about computing whether or not it is a package travel day
case when Holiday = 1 then 0
       when BusinessDay = 0 then 0
       else 1


(The security rules of this site are blocking me from uploading more complete SQL in a code block.)