Compare data ranges if they contain a specific date

Hello,
I have a list of payments. They have start and end dates. I need to identify if any of those transactions spread over April 1st.

Example:
Transaction A Start Date: 2020-01-01 and End date: 2038-12-31. This transactions covers April 2022.
Transaction B Start Date: 2023-04-01 and End date: 2030-05-01. This transaction does not cover April 2022.
Note: April 2022 is anything from April 1st to April 30th (or just April 2022).

Can anyone help?

@IrynaK a rule engine or like in this case row filter might help:

Thank you! Trying to process your flow - so my transaction start and end date - they will be LFL_start and end dates? So how does April 1 to 30th dates fit in?

Hi @IrynaK , I’m not entirely sure what you mean by “I need to identify if any of those transactions spread over April 1st.”, but the assumption is that for a transaction to “cover April 2022”, it means that the whole of April (April 1st to April 30th) has to be part of the transaction date range.

Based on this assumption, you just need to check if your Start Date is <= 2022-04-01 AND End Date >= 2022-04-30, that’s all.

Input dates:
image

Applying the logic, the results are:
image

Something like this:
image

Here’s the workflow: Check if date ranges cover April 2022.knwf (7.3 KB)

1 Like

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.