Icon

kn_​example_​r_​sequence_​days_​in_​month

Generate a list of all days in a month with seq() in R

Generate a list of all days in a month with seq() in R

knime.out <- as.data.frame(seq(as.Date("2019/10/01"), as.Date("2019/10/31"), "days"))
names(knime.out)[1] <- "list_days"

knime.out$list_days <- as.character(knime.out$list_days)



knime.out <- as.data.frame(seq(as.Date("2019/10/01"), as.Date("2019/10/31"), "days"))names(knime.out)[1] <- "list_days"knime.out$list_days <- as.character(knime.out$list_days) Create a sequence of days for one month (use the current execution time)https://forum.knime.com/t/create-date-automatic-with-flow-variable/19173/2?u=mlauber71 result looks like this:list_days2019-10-012019-10-022019-10-032019-10-042019-10-052019-10-062019-10-072019-10-082019-10-092019-10-102019-10-112019-10-122019-10-132019-10-142019-10-152019-10-162019-10-172019-10-182019-10-192019-10-202019-10-212019-10-222019-10-232019-10-242019-10-252019-10-262019-10-272019-10-282019-10-292019-10-302019-10-31 used this discussion to create first and last dayhttps://forum.knime.com/t/last-day-of-the-month/5029For date variables in KNIME and R also see:https://hub.knime.com/mlauber71/spaces/Public/latest/kn_example_r_date_formats_extended Medium: KNIME and R — installation across operating systems — some remarkshttps://medium.com/p/6494a2a498ccvery basic R nodes in KNIME - knime.in, knime.out and handle Flow Variableshttps://hub.knime.com/-/spaces/-/~119aEydIH0oCdht8/current-state/ Node 1list_daysdate_nowExecution timehttps://forum.knime.com/t/last-day-of-the-month/5029Daysstart_dateend_dateyyyy-M-ddaysdaysR Source (Table) String to Date&Time Create Date&TimeRange extract first andlast day of month Create Date&TimeRange Table Creator Table Creator Column Appender String to Date&Time Table Rowto Variable Math Formula Date&TimeDifference knime.out <- as.data.frame(seq(as.Date("2019/10/01"), as.Date("2019/10/31"), "days"))names(knime.out)[1] <- "list_days"knime.out$list_days <- as.character(knime.out$list_days) Create a sequence of days for one month (use the current execution time)https://forum.knime.com/t/create-date-automatic-with-flow-variable/19173/2?u=mlauber71 result looks like this:list_days2019-10-012019-10-022019-10-032019-10-042019-10-052019-10-062019-10-072019-10-082019-10-092019-10-102019-10-112019-10-122019-10-132019-10-142019-10-152019-10-162019-10-172019-10-182019-10-192019-10-202019-10-212019-10-222019-10-232019-10-242019-10-252019-10-262019-10-272019-10-282019-10-292019-10-302019-10-31 used this discussion to create first and last dayhttps://forum.knime.com/t/last-day-of-the-month/5029For date variables in KNIME and R also see:https://hub.knime.com/mlauber71/spaces/Public/latest/kn_example_r_date_formats_extended Medium: KNIME and R — installation across operating systems — some remarkshttps://medium.com/p/6494a2a498ccvery basic R nodes in KNIME - knime.in, knime.out and handle Flow Variableshttps://hub.knime.com/-/spaces/-/~119aEydIH0oCdht8/current-state/ Node 1list_daysdate_nowExecution timehttps://forum.knime.com/t/last-day-of-the-month/5029Daysstart_dateend_dateyyyy-M-ddaysdaysR Source (Table) String to Date&Time Create Date&TimeRange extract first andlast day of month Create Date&TimeRange Table Creator Table Creator Column Appender String to Date&Time Table Rowto Variable Math Formula Date&TimeDifference

Nodes

Extensions

Links