My Filter Expression for Dates is not working

Hello All,

I have a date field in input and I’m trying to apply a filter

I want to filter only for the date type field: ZCC04 Proc. Date
where it is before today’s date minus 11 days.

I’ve tried both expressions but nothing is being outputted.

Date.parse($[‘ZCC04 Proc. Date’]) <= (Date.now().minusDays(11))

$[‘ZCC04 Proc. Date’]<Date.now().minusDays(11)

Since the record’s Proc date is June 27, 2022 (2022-06-27), I would think the record would be filtered as true since 11 days before today would be July 11, 2022.

June 27, 2022 < July 11, 2022

I’m so upset it’s not working…

Hey @Shawnaby,

I believe that this is happening because the date is not parsed at all. Can you show us the format of the incoming date?

2 Likes

Agreed with @bojanvelevski’s point.
The data type might be different for both the dates for which Date.parse didn’t work for you.

I’ve tested the same solution and it was working for me, please refer to this for more details:

2 Likes

Yes I had to parse the date. I thought it was already in date format, so I thought I didn’t need to specify the convention after the field ($xxx, yyyy-MM-DD)…

1 Like

Great, so is it safe to assume that the issue has been resolved?