Compare date from two different tables

users
#1

Hi,

I have two date fields in a table : StartDate and Enddate (the difference between these two represents the delay needed to assemble a machine).
In another table I have a list of days with their date (corresponding to the days the factory is closed).

What I want is, for every day (in the second table) the factory is closed in the gap between StartDate and Enddate, the difference count -1, as the assembling delay should not take care of days of closure.

Example: in format dd/MM/yyyy
|StartDate |Enddate|
|30/04/2019|03/05/2019|

Holidays
01/05/2019

Here the assemble delay is 4 days, but should become 3 because 1st of May is a holiday.

I can’t find the right node to compare days of closure with the Start and End dates, as I don’t want to join them because they don’t have the same number of rows.
Note that the holidays table count holidays from different factories and I’m only interested in one of them, I can use factory number as joiner but its not an unique field.
Does someone have a solution for that ? Tell me if my issue isn’t clear.

Thank you for your help.
Regards,

Rémy

0 Likes

#2

Hi @RemyMlr

Your question looks a lot like this one Data Manipulation Based On Non Working Day

gr
Hans

2 Likes

#3

Hi HansS,

It does indeed.
I have been searching quite a while for a similar topic without success, got to reconsider my research skills now…

Anyway, thank you for your help !
Though the provided solution in the other post looks quite complicated considering my beginner condition… do you mind if, when there is things I can’t understand I ask you here ?

Regards,

Rémy

0 Likes

#4

@HansS

Hi again,

I’ve been using the work of the topic you led me to.
I use the same functioning for my work, but when I use the recursive loop (2 port), and then column expression to compare the date with Startdate and Enddate.
In this column expression appears an error, he can’t find the variable corresponding to my Date (Day of closure). I guess the link between my two tables isn’t done properly, as the day of closure is used from its proper table…
I thought the link between the table was done by the 2 ports recursive loop, is it wrong ? If it is, can you tell me what is supposed to link two tables for the column expression to work ?
Thank you.

Regards,

Rémy

0 Likes

#5

Hi @RemyMlr,

I suggest following the approach in the solution provided by @HansS:

It’s faster and simpler.

:blush:

2 Likes