Number of weekdays and weekend days between 2 dates
Forums
Dear all ,
As per subject what is the easier way to find out the exact number of working days and weekend days that occur between 2 dates (regardles of public holidays).
Lets analyse the below example:
Start Date End Date
02/01/2019 15/01/2019
Equation: End Date - Start Date
Result: 10 working days, 4 weekend days
I know that i could potentially use: @Dow and @Workday functions in IDEA but without counting first the number of days between both dates and then using nested Ifs statements I cannot see it working.
Any tips are much appreciated.
Hello borderraux,
Hello borderraux,
This is what I did. I first downloaded the python custom function and saved it in the Custom Functions.ILB directory under the project I am going to use it.
I changed the extension to .py and removed the .txt portion.
I then created a character virtual field of length 40.
and entered the following equation. I am using the Sample-Payments from the Sample project folder.
When I run this equation I get the following:
If you are stil having problems let us know what they are. I can't remember which language version you are using but in some languages you will have to change the commas "," to semi-colons ";" in the equation editor for field separators.
Brian
Thank you Brian.
Thank you Brian.
Please see the sequence of the screenshots i have taken while trying to run the function.
As you can see from the attached screenshots today I cannot even see the function being present in Custom Function.ILB folder (that wasnt the case yesterday and day before yesterday)....
Thank you Brian, all worked
Thank you Brian, all worked ok - i modified the function slightly to display as a result the numbers of weekdays/weekends rather that the string as well.
Ravi , thank you for providing the function in first place - it seems that I just didnt realise that Python function can be run by IDEA even if it is not visible physically to the user.
This is the version i am
This is the version i am using:
Client Version: 10.3.0.1139 (X86 )
However before posting my reply yesterday I tried to run it and it didnt work...