Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
有一些关于通过 MongoSkin 将时间戳插入 Mongodb 的帖子,但在返回端没有任何内容(除了从 ObjectID 中提取日期)。
运行 findOne(包括 MongoDate 字段)后,控制台日志将数据字段读取为 ISO 日期,但是否有一个内部函数可以提取 ->sec / 时间戳。
答案是:new Date( response.Date ).getTime()
new Date( response.Date ).getTime()