View Only
  • 1.  How to find the StartDate & EndDate using the Month Name

    Posted 01-04-2021 08:54


    My requirement is to find the number of working days (option to include holidays) for the given month. I tired to use the "calculate workdays" node for which I need to find the start date & end date for the given month name in the graph parameter. 

    Pl suggest. 



  • 2.  RE: How to find the StartDate & EndDate using the Month Name

    Posted 01-04-2021 10:53

    Note: This was originally posted by an inactive account. Content was preserved by moving under an admin account.

    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