Using mongoDB $dateAdd with a variable

Hi!

I'm working in a query using mongoDB and I want to get all documents between a date and that date plus one day.

I'm trying to do it using $gte: {{date}} and $lt: $dateAdd{...}. You can see it better in this capture:

As you see, I get no error but also no results.
If I take out the $lt with the $dateAdd from the $match and return the $dateAdd as a column I can see that the value is being generated correctly:

Any ideas on what I'm doing wrong?

Thanks!

Hi @prufat
Looks like you have having timezone issues:
https://www.metabase.com/docs/latest/troubleshooting-guide/timezones.html
Post "Diagnostic Info" from Admin > Troubleshooting.

Hi @flamber
I've set the timezone parameter but still nothing. Same behavior.

@prufat

Post "Diagnostic Info" from Admin > Troubleshooting.

I don't know which parameter you are referring to. Mongo does not timezone via Report Timezone:
https://github.com/metabase/metabase/issues/9715 - upvote by clicking :+1: on the first post

I don't know what your updatedAt is or if it includes timezone, which in that case, then you might need to adjust for that.

Sounds like you are seeing this issue:
https://github.com/metabase/metabase/issues/12842 - upvote by clicking :+1: on the first post