question

Jayank avatar image
Jayank asked

Including Holidays in Networkday calculation in SQL

I want yo calculate the TAT(NETWORK days) in which we can exclude Saturday, Sunday + Holidays(which comes in between Date Range) Below is the case in which I wanted to apply this function. I have two table Holiday and OrderShip HOLIDAY_Table Holiday | Country 9-May-2016 | India 9-May-2016 | America 5-May-2016 | China OrderShip Row_Num |Region | Order Date | Ship Date | TAT 1 |[China | 4-May-2016 | 9-May-2016 | 2 |America | 8-May-2016 | 10-May-2016|][1] So function I want, which first pick Region Name in OrderShip Table then search for Holiday in Holiday_Table, if there is any Holiday of specific region and between the Order Date and Ship Date, then count it and deduct it will calculating the NeTwork Days. For Example... While calculation for Row Number -- 1 first it pick the china, then it search holidays for china in Holiday table between the specific Order date and Ship Date. [1]: /storage/temp/3403-holiday-structure.xlsx
date-functionsnetwork
2 comments
10 |1200 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

I don't understand your question at all. This would be a good place to start. http://spaghettidba.com/2015/04/24/how-to-post-a-t-sql-question-on-a-public-forum/
1 Like 1 ·
@Jayank: Are you simply wanting to be able to count the number of working days between two dates, and to have the answer accommodate weekends and public holidays?
0 Likes 0 ·

0 Answers

· Write an Answer

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.