You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
MongoDB Engine implemented year lookups by querying by date range. That does not work for month and day lookups (those were unsupported). Regex matching could be used for year, month, and day, but nothing more advanced like day of week.
I think the $expr operator offers the greatest capability, e.g.
day = 0
db.mydatabase.mycollection.find({
"$expr": {
"$eq": [ { "$dayOfWeek": "$date" }, day ]
}
})
The text was updated successfully, but these errors were encountered:
MongoDB Engine implemented year lookups by querying by date range. That does not work for month and day lookups (those were unsupported). Regex matching could be used for year, month, and day, but nothing more advanced like day of week.
I think the
$expr
operator offers the greatest capability, e.g.The text was updated successfully, but these errors were encountered: