[SalesForce] Last 30 days formula in process builder not working

Creating a PB that will update a checkbox on the Lead to True if,
1) Status = Completed (this is done)
2) Due Date is within the last 30 days.

When I try to create a formula for that and use LAST 30 DAYS in the PB it doesn't work, I get an error: "The formula expression is invalid: Syntax error. Found 'LAST'".

How do I create this PB so that it can check to see if there is a task that has been completed in the last 30 days (using the due date, not last modified date or created date)

Best Answer

You'll want to use the built-in DateTime function TODAY(), and then simply subtract 30 from it. Thus your formula for the Due Date field would be DueDate >= the following:

TODAY() - 30