Forum Academy Marketplace Showcase Pricing Features

Need hep to write an expression for a constraint

So I have an input that needs to display the count of orders made say “This month”, “Last week”, etc.

I do a search for orders but can’t figure out how to write the constraint to show orders made only for “this month”. When I do => created date = current date/time:extract to month, I get the obvious error of the left side of the expression being date while the right is text…I need help. I know there should be a very simple way to do this.

Hi there, @jmallet… instead of extracting the month, try using the :rounded down to operator (rounding down to month, of course) and see if that produces the desired result.

Hope this helps.

Best…
Mike

1 Like

Thanks. When I use that I don’t get an error anymore but it didn’t give any result. See screen shot below.

Sorry, I should have mentioned that you need to change the equals sign in the expression to greater than.

1 Like

Wow works perfectly. Like magic. How about for last month, last week, last x days, etc…pleeeaaase

1 Like