Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
livio218526
Creator
Creator

Dynamic holiday days

Hello to all,

I would like to know if there is a method for calculating all holidays for each year (2017,2018,2019,...), so as to monitor values in the "networkdays" function.

For example, Christmas, Indipendence day, etc....

Thanks,

Livio

7 Replies
agigliotti
Partner - Champion
Partner - Champion

take a look here Exclude holidays using Networkdays() in script

it could help you.

livio218526
Creator
Creator
Author

Thanks, I'd like to be able to define holidays without the use of an external file.

dapostolopoylos
Creator III
Creator III

Networkdays() function returns the number of working days (5 days working week) between two given dates.

If you want to "flag" the dates as working or not an customise the list per country, at my knowledge, you can't avoid using an external file.

What i have done when i tried to flag working dates for an application and customise this list with the Greek holidays, was to use an external xlsx file  which was the result set of the calculation of working days i did on SQL Server.

If you want to take a look on the SQL script, check this link: https://gist.github.com/dapostolopoylos/69df1c7f83e09bf68680

Keep in mind that if you want to use it for another country you have to do the proper customisations.

Father/Husband/BI Developer
DavidŠtorek
Creator III
Creator III

Hi,

I am using own calendar for this task. I create a calendar in script, than create an inline table with all holidays dates (formated as DM). Than connect to my generated calendar and create flag for holiday. If you need than you can load only rows flaged as holiday and you will have field with all holidays for period for which you create the calendar. It is even possible to take in account Eastern holiday (if you have it in your country).

rittermd
Master
Master

I don't know how you could avoid using an external file.  Every country has different holidays and most companies have a slightly different list of holidays.  You would have to build a list of holidays for your environment.

livio218526
Creator
Creator
Author

US Calendar

Anil_Babu_Samineni

There is no system to make all lists in field for holidays. Instead, Usually we need to maintain Mapping table to get them.

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful