mongo shell 插入时间数据

2021-11-23  本文已影响0人  飞跑的蛤蟆
db.collection.insert([{'_id': ObjectId('5f1ebc633286f41a3079f724'),
    'updateTime': new Date(2020, 7, 27, 19, 37, 7, 616000),
    }])

Date()

Returns a date either as a string or as a Date object.

You can specify a particular date by passing an ISO-8601 date string with a year within the inclusive range 0 through 9999 to the new Date() constructor or the ISODate() function. These functions accept the following formats:

上一篇 下一篇

猜你喜欢

热点阅读