What SQL date functions are supported?


#1

I need to filter the results of query to records created yesterday. The obvious answer is to use a SQL function such as NOW() or CURTIME(). But I can’t find such a date function that’s supported by redash. Any suggestion? Is there documentation about which SQL functions are supported?


#2

Redash has no SQL syntax of its own. You can use whatever SQL functions your database supports.


#3

What about queries on the “Queries Result Cache”? Which date functions can I use there?


#4

i use DATE_ADD in my queries, but when trying to use DATE_ADD in a query on the “Queries Result Cache”, I get the error: “Error running query: **no such function: DATE_ADD**”


#5

By looking into the code I found out that “Queries Result Cache” uses SQLLite, so the SQLLite functions are supported there and instead of DATE_ADD I can use DATETIME(“date”, ‘+24 hours’)