Showing results for 
Search instead for 
Did you mean: 

Alteryx designer Discussions

Find answers, ask questions, and share expertise about Alteryx Designer.

Date Time Functions & In-Database Tools


I'm able to take information from the last three months by using a filter tool and the custom filter: [field] > DateTimeAdd(DateTimeToday(),-3,"months").


This would be more convenient if I use this filter in-database however. But this same custom line does not work. It gives this error:


Error: Filter In-DB (3): Error SQLPrepare: [Simba][Hardy] (80) Syntax or semantic analysis error thrown in server while executing query. Error message from server: Error while compiling statement: FAILED: SemanticException [Error 10011]: Line 1:144 Invalid function 'DateTimeToday'


Is there any way I could get this function to work in-database?

Alteryx Certified Partner

The In-DB tool don't use the same formula syntax, or support the same functions as the regular Alteryx tools. They execute their code on the database server, so the formula must be written for the database language. In SQL Server, it will look something like this:




Make sure the input field is formatted properly and that should be it. An example solution is attached.