Icon

kn_​example_​date_​week_​month_​identify

Check if a day is in the first week of a month and record if the execution has been done

Check if a day is in the first week of a month and record if the execution has been done

Outer case when Reset the file to collect the runs You could combine the approaches and add the 'not allowed' days ( is_first_day_of_first_week_of_month=0) to the list of already run dates Inner case when create a reference file for the current year with weeks (numbers) and markers of the first weeks per month and first days of first weeks per monthPlease check your local settings. You can also provide your own list with these information.Also check the links in the workflow description about KNIME and week numbers Check if a day is in the first week of a month and record if the execution has been doneWeek numbers different date systems - KNIME Forum (76641) - https://forum.knime.com/t/extract-date-time-fields/76641/2?u=mlauber71 possible variations of week calculation, also:https://forum.knime.com/t/extract-date-time-fields/76641/2?u=mlauber71 all daysof the yearTodayYearYear_StartYear_EndYear_StartYear_EndWeekMonthextract first weekof each monthon "Advanced" Minimum of week"is_first_week_of_monthDays_Yearmake suredays are uniqueis_first_week_of_monthextract first dayof first weekof each monthis_first_week_of_month=1is_first_day_of_first_week_of_monthis_first_day_of_first_week_of_monthjoinTodayand the list of datesthis yearSTART 2active port isdetermined byvariableis_first_week_of_monthor is_first_day_of_first_week_of_monthEND 2is_first_week_of_monthis_first_day_of_first_week_of_monthjust to simulate SQLprocessexecuteSQLexecuteSQLExecution_Date.csv=> record the datewhere teh workflow has been executedREMOVE afterTestsExecution_DateExecution_DateExecution_Date.csvExecution_Date.csv=>exclude day if this day has been 'used'alreadyTodaySTART 1if the date has not yet been usedEND 1just to geta connection to CASE Endyear_days_weeks_reference.table$is_first_week_of_month$ = 0 => TRUEExecution_DateExecution_Datethe dates when the job has been executedand the days which are not in the first weekare being removedNode 50Node 51-1 yearNode 53-2 yearNode 55Create Date&TimeRange Create Date&TimeRange Extract Date&TimeFields Column Expressions String to Date&Time Table Rowto Variable Extract Date&TimeFields DuplicateRow Filter ConstantValue Column Joiner Date&TimeDifference DuplicateRow Filter Missing Value DuplicateRow Filter Row Filter ConstantValue Column Joiner RowID Missing Value Joiner CASE Switch Start CASE Switch End Table Rowto Variable SQLite Connector DB SQL Executor DB SQL Executor CSV Writer Active BranchInverter Table Creator Table Creator CSV Writer CSV Reader ReferenceRow Filter Merge Variables Date&Time to String Empty Table Switch CASE Switch End Variable toTable Row Table Writer Rule-basedRow Filter Column Rename Date&Time to String Column Filter Concatenate DuplicateRow Filter Java Snippet Date&Time Shift Java Snippet Date&Time Shift Java Snippet Outer case when Reset the file to collect the runs You could combine the approaches and add the 'not allowed' days ( is_first_day_of_first_week_of_month=0) to the list of already run dates Inner case when create a reference file for the current year with weeks (numbers) and markers of the first weeks per month and first days of first weeks per monthPlease check your local settings. You can also provide your own list with these information.Also check the links in the workflow description about KNIME and week numbers Check if a day is in the first week of a month and record if the execution has been doneWeek numbers different date systems - KNIME Forum (76641) - https://forum.knime.com/t/extract-date-time-fields/76641/2?u=mlauber71 possible variations of week calculation, also:https://forum.knime.com/t/extract-date-time-fields/76641/2?u=mlauber71 all daysof the yearTodayYearYear_StartYear_EndYear_StartYear_EndWeekMonthextract first weekof each monthon "Advanced" Minimum of week"is_first_week_of_monthDays_Yearmake suredays are uniqueis_first_week_of_monthextract first dayof first weekof each monthis_first_week_of_month=1is_first_day_of_first_week_of_monthis_first_day_of_first_week_of_monthjoinTodayand the list of datesthis yearSTART 2active port isdetermined byvariableis_first_week_of_monthor is_first_day_of_first_week_of_monthEND 2is_first_week_of_monthis_first_day_of_first_week_of_monthjust to simulate SQLprocessexecuteSQLexecuteSQLExecution_Date.csv=> record the datewhere teh workflow has been executedREMOVE afterTestsExecution_DateExecution_DateExecution_Date.csvExecution_Date.csv=>exclude day if this day has been 'used'alreadyTodaySTART 1if the date has not yet been usedEND 1just to geta connection to CASE Endyear_days_weeks_reference.table$is_first_week_of_month$ = 0 => TRUEExecution_DateExecution_Datethe dates when the job has been executedand the days which are not in the first weekare being removedNode 50Node 51-1 yearNode 53-2 yearNode 55Create Date&TimeRange Create Date&TimeRange Extract Date&TimeFields Column Expressions String to Date&Time Table Rowto Variable Extract Date&TimeFields DuplicateRow Filter ConstantValue Column Joiner Date&TimeDifference DuplicateRow Filter Missing Value DuplicateRow Filter Row Filter ConstantValue Column Joiner RowID Missing Value Joiner CASE Switch Start CASE Switch End Table Rowto Variable SQLite Connector DB SQL Executor DB SQL Executor CSV Writer Active BranchInverter Table Creator Table Creator CSV Writer CSV Reader ReferenceRow Filter Merge Variables Date&Time to String Empty Table Switch CASE Switch End Variable toTable Row Table Writer Rule-basedRow Filter Column Rename Date&Time to String Column Filter Concatenate DuplicateRow Filter Java Snippet Date&Time Shift Java Snippet Date&Time Shift Java Snippet

Nodes

Extensions

Links