Filter dates

Hello good afternoon I present the following query:

I have three date type fields called: FEC_PAGO_DIVIDENDO, PREV_3R_DATE and OPERATION_DATE_3R, which I need to filter all the records associated with the three fields with dates prior to 07-02-2022.

Screen print is attached with the fields

You can use the Rule-Based Row Filter node for this. The expression will be determined by what exactly it is you’re trying to do.

which I need to filter all the records

Does this mean you want to remove matching records? Or do you want to keep matching records?

associated with the three fields with dates prior to 07-02-2022.

Does this mean a row will be a match if the date in ANY of these columns is prior to 07-02-2022?
Or does this mean that a row will be a match if ALL of these columns contain dates prior to 07-02-2022?

@elsamuel thanking again the help attached excel with the filters of the columns applied to the date type fields.

An image is attached with the filters applied where the date filter is applied to each column, which must be prior to 07-02-2022
Work Flow.xlsx (68.6 KB)

You can do this in the Rule Engine node, with the Expression: $FEC_PAGO_DIVIDENDO$ < "2022-07-02" AND $PREV_3R_DATE$ < "2022-07-02" AND $OPERATION_DATE_3R$ < "2022-07-02" => TRUE

An alternative is to use a series of Date&Time Based Row Filters

image

Here’s an example configuration:

Hello @elsamuel good morning, I want to thank you very much for the support provided.

From yesterday’s help it worked for me, but I need to add the following condition:

If the date is null for the fields that must be filtered, keep those null records in case the field presents a date and is prior to 07-02-2022, apply the filter.

Screen print is attached as visual support

Hello @elsamuel good morning, I want to thank you very much for the support provided.

From yesterday’s help it worked for me, but I need to add the following condition:

If the date is null for the fields that must be filtered, keep those null records in case the field presents a date and is prior to 07-02-2022, apply the filter.

Screen print is attached as visual support

Hi @Pedro87, let’s give elsamuel a chance to answer without reposting the same question. It helps us keep the forum tidy.

It seems to me that the you can modify the Rule Engine node expression from my first post to use OR instead of AND:

$Column1$ < "2022-07-02" OR $Column2$ < "2022-07-02" OR $Column2R$ < "2022-07-02" => TRUE

A row will match if the date in ANY of these columns is prior to 07-02-2022.

If this is not what you’re trying to do, then I’m not sure I understand the logic.

1 Like

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