Metabase MongoDB custom date filtering

Metabase is generating this query :


I want to add two date filter Start Date & End Date which will work on openedAt variable, how can I do that? Also it should be optional variable. kindly help, thanks.

Hi @kayumuzzaman
Try doing a filter using between, since it would likely make it a little easier to understand where to place the variables. And then have a look here:

not sure how to do it using mongo, i have done it in postgres.

Having an issue in mongo. Did you find out the fix?

@Anum So instead of just writing a comment like that, which helps no one, then you could provide a link to the forum topic you have: Optional date clause in mongo db query
Try to help making this forum better. And when you find the answer to a question, then post the answer instead of just leaving the topic hanging.