How to create a range using a date column

Hi guys,

I'm trying to create a range using the RULE ENGINE NODE and a column with dates...

Just like this

DATE_CREATED

01.feb.2017

02.feb.2017

03.feb.2017

04.feb.2017

 

So i want to create a rule who creates a new column reading the data of DATE_CREATED and just put a label saying - DATE_CREATED >= "01.feb.2017" AND DATE_CREATED < "03.feb.2017" => "CORRECT" 

But unfortunately the sintax doesn't works with dates... how can i fix this?

Hi,

You could use the Date Field Extractor node to create columns with the relevant fields as strings, then Column Combiner to create a single string column for the date.

Best,

Jon

Hi everyone, I have the same request as zealicio. But not sure how to apply jonfuller solution.

The dataset is as follows, were all three columns are formated as Date not in string

I want to add a nominal column that says if the third column [VALUE] is between the first and second date

But when using the Rule Engine it does not work

Dates Between.knwf (16.3 KB)

Any help will be appreciated

Cheers

Mau

Hi @mauuuuu5

Strange for me as well. You can try this workaround by first replace the “/” by “-” in your string-formatted dates and the change them to a Date Format. Dates Between 2.knwf (34.8 KB)

.
It is not a nice solution but it works.

gr. Hans

1 Like

Hi @mauuuuu5,

I think the issue in your workflow is the wrong date format in the String to Date&Time node. Use “d/M/yyyy” instead and it should work.

Best,
Simon

3 Likes

Simon that worked perfectly

Thank you

Thank you HansS, it worked perfectly

1 Like