How to use current date in prefilter

How to use current date in prefilter? For example if I want to filter records based on createdAt or updateAt.

Hello, to use Date type field in prefilter, or any other filter you’ll have to wrap the field names in DATE()

To get current date use DATE(NOW())

For your example:
DATE(createdAt) > DATE(NOW())

For the operator you can use !=, =, >, >=, =<, <

2 Likes

hello, i tried to use this syntax to compare two date and time record in a gateway step as a condition but with no success, what’s the correct syntax to use in condition fields ?

Thanks for the answer. What all syntax does prefiltering support?
What about 7 days from now? etc.

I will dig trough the code at some point to see what it all supports - it would be a great idea to through it in the docs there for people.

1 Like

Hi @ashevelyov ,

did you check our official docs? You could use modWeek:
https://docs.cortezaproject.org/corteza-docs/2023.9/integrator-guide/expr/fnc-reference.html#_modweekdatetime_weeks

You can find the expression syntax on this page.

2 Likes