in my collection each document has 2 dates, modified and sync. I would like to find those which modified > sync, or sync does not exist.
I tried
{\'m
Use Javascript, use foreach And convert Date To toDateString()
db.ledgers.find({}).forEach(function(item){ if(item.fromdate.toDateString() == item.todate.toDateString()) { printjson(item) } })