today = datetime.utcnow() yesterday = today + timedelta(days=-1) record = [x for x in db.collection.find({'updatedAt': {'$gte': yesterday, '$lt': today}})]