I have an application written in c# that cannot run on a public holiday or a weekend. I\'ve looked around a bit and haven\'t found anywhere (official) that provides all the
I tried the "answer" and spent time to heavily modify it to be more readable. Really those "-DATEPART" options aren't needed since we are setting the date right before. It worked pretty well but was having issues with MLK day 2020 so my trust in it was shaky.
Additionally I didnt like the fact that it was very difficult to read. I found this and it's much easier to get through. It works very similar to a date dimension table and tested accurately for the 3 years I tried.
https://www.codeproject.com/Tips/1168430/US-Federal-Holidays-SQL