Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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
take a look here Exclude holidays using Networkdays() in script
it could help you.
Thanks, I'd like to be able to define holidays without the use of an external file.
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.
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).
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.
US Calendar
There is no system to make all lists in field for holidays. Instead, Usually we need to maintain Mapping table to get them.