This site uses different types of cookies, including analytics and functional cookies (its own and from other sites). To change your cookie settings or find out more, click here. If you continue browsing our website, you accept these cookies.
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?
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.