We recommend switching to the latest versions of Edge, Firefox, Chrome or Safari. Using Internet Explorer will result in a loss of website functionality.

How to find the StartDate & EndDate using the Month Name


1 comment

  • Avatar
    Gerry Mullin

    Take a look at the brg attached. It does the following.

    1. Expects a parameter with the month name, spelled complete, e.g. January. You did not specify if there was a year given in your graph parameter, so I presumed there was not and I used the current year to work out the exact month that was to be calculated, e.g. January 2020 has different work days to January 2021.
    2. There is a parameter called Holidays where you can enter a list of dates that you want recognized as Holidays and not work days, outside of Saturday and Sunday. Enter these days in the format YYYY-MM-DD and have one per line.
    3. The Filter node will first translate January to 1, February to 2 etc and attach the current year to it. Then then first and last date of the month is calculated from it.
    4. The first while loop will cycle through the entire month and add a count to either workday_count or nowork_count, depending on if the day is a weekend (Saturday and Sunday) or not.
    5. The second while loop will cycle through all of the Holiday values listed in the graph parameter and subtract a day from the workday_count value and add a value to nowork_count value, if the Holiday falls in the same year and month.


    Attached files



    Comment actions Permalink

Please sign in to leave a comment.