Filtering dates with "<=" not working

Whenever I try to filter the date in a new question (apparently saved ones do it the proper way), the behaviour of "<=" is actually "<" as shown in the screenshots below.

Does the date without explicit time of the day considers the first minute of it and though none of my transactions get retrieved in the query?

Hi @diego.sanches
Which version of Metabase?
Which database are you querying?
When using a plain query (without any filters/parameters), then the SQL is just transferred to the database without any modification, so the query should run exactly like it does on your database (except for added LIMIT).
If ca.created_at is a DateTime column, then you need to convert/cast it as Date, otherwise it’s just reading it like ca.created_at <= '2019-05-31 00:00:00'

Hi @flamber.
Casting it solved the problem.
Thank you for your answer.

1 Like