MongoDB + nodejs : how to query ISODate fields?

后端 未结 4 1864
失恋的感觉
失恋的感觉 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:25

    You can use new Date('2013-12-12T16:00:00.000Z') in node.js;

    new is a must, because Date() is already use to return date string.

    ISODate is concepted in mongodb, you can use it in mongodb console, but it can be different for different programming language.

提交回复
热议问题