MongoDB + nodejs : how to query ISODate fields?

后端 未结 4 1867
失恋的感觉
失恋的感觉 2020-12-01 11:58

I am using nodejs with the node-mongodb-native driver (http://mongodb.github.io/node-mongodb-native/).

I have documents with a date property stored as ISODate<

4条回答
  •  心在旅途
    2020-12-01 12:24

    You can go through my answer, provided in other asked question.

    Their instead of $eq use $gte:"yyyy-mm-dd", $lte:"yyyy-mm-dd"

    NodeJS MongoDB: Querying ISO Date

    Hope this will help you or somebody else!

提交回复
热议问题