How is regex filter applied to date (isodate) type field in mongodb

9 views
0

I was trying to apply a regex filter(year) to a date type field but the query returned no results. So was trying to understand the behavior of this query?

db.collection.find({"ReportedDate":/2016/i})

Note: I can filter it by date type without regex. But I am just trying to understand the behavior of the regex filter against date type field?