Skip to content

Instantly share code, notes, and snippets.

@ejaz-vintega
Created April 7, 2021 06:17
Show Gist options
  • Save ejaz-vintega/3ee639b5e8da4d9659021c75873878c0 to your computer and use it in GitHub Desktop.
Save ejaz-vintega/3ee639b5e8da4d9659021c75873878c0 to your computer and use it in GitHub Desktop.
Get objects between timestamps in MongoDB
Query.prototype.find({
updatedAt: { $gte: ISODate("2021-04-06T04:00:00.000Z"),$lt: ISODate("2021-04-06T12:00:00.000Z")}
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment