No such function DATEDIFF

Hi!

I’m new to Redash and maybe I’m doing something wrong, but it seems that DATEDIFF is not working.

When querying

DATEDIFF (minutes, 'date', 'date')

I get “no such column 'minutes” error.

When querying

DATEDIFF ('date', 'date')

I get “no such function DATEDIFF”

Doet DATEDIFF have some different syntax here? How do I use DATEDIFF on Redash?

Thank you!

Redash sould not impact the SQL query. Which type of database are you querying?

I’m using my own CSV file from dropbox

So you are querying your file with a QRDS query, which is using SQLite.

SQLite does not have a DATE_DIFF function (handling dates is really tricking with SQLite). You can find some tricks about it on Stackoverflow.

1 Like