How to Filter Dates Older Than 24 Hours in a Scenario

What are you trying to achieve?

Hello,

I want to create a filter that allows dates that are more than 24 hours old compared to the current time/date when the scenario runs. I’m retrieving the date in this format: “Thu, 08 Aug 2024 10:37:18 GMT”. How can I achieve this?

Welcome to the Make community!

Your filter should look like this:

{{ 1.dateVariable }}

Datetime operators: earlier than

{{ addHours(now; -24) }}

Hope this helps! Let me know if there are any further questions or issues.

@samliew

2 Likes

Thank you. I tried and just changed ‘hours’ to ‘minutes’ to quickly check if it worked and set a test date that I get as output. Despite this, it still doesn’t work. Do you have any ideas?

At 2:30 PM, come over to my place

What you entered in the first field is not a date variable.

You can insert a date variable by using the built-in function parseDate

e.g.:

{{ parseDate("08/08/2024"; "DD/MM/YYYY") }}

For more information, see the function documentation in the Help Center.

Hope this helps! Let me know if there are any further questions or issues.

@samliew

3 Likes

Thank you, I managed to do it !

1 Like