I just use knime a few days ago. anyone can suggest me for solve my problem. I want to create date use Create Date&Time Range Node automatically with flow variable. The workflow can be like this.
- Report that I do on November, then automatically create date from October,1 - October 31.
- Report that I do on December, then automatically create date from November,1 - November 30.
and so on.
here I also show the output what I want.
I have idea to month from use excecution time minus by 1 but I confused to execute that.
sorry if my english not good enough.
You could use R and the seq() function to do this
knime.out <- as.data.frame(seq(as.Date(“2019/10/01”), as.Date(“2019/10/31”), “days”))
names(knime.out) <- “list_days”
knime.out$list_days <- as.character(knime.out$list_days)
kn_example_sequence_days_in_month.knwf (13.5 KB)
edit: Extended version that also determines the first and last day of current month:
Hi @Nanda_Rukmana -
Here’s an example workflow that should do what you need, based on KNIME nodes only (if you don’t want to use R).
If I run it today (October 31), all the days in September 2019 are returned:
Hi there @Nanda_Rukmana,
to add my solution as well (similar to one @ScottF provided already). I decided to use Column Expressions node to determine the first day of previous month.
Additionally this seems as a frequent request. Not exactly this one but some kind of date creation/manipulation based on execution point in time. Hopefully we will figure out a way to make this easier in KNIME. Or someone maybe willing to create a Component?
This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.