Created
September 26, 2018 11:53
-
-
Save Mualig/cd7d7b30de79edaded1b6876945e55e0 to your computer and use it in GitHub Desktop.
Remove old mongo documents based on _id
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
db.getCollection("raws").remove({ | |
$where: function() { | |
return this._id.getTimestamp() <= new Date("2018-08-12"); | |
} | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment