On this page本页内容
ObjectId.getTimestamp()
Returns the timestamp portion of the 返回ObjectId()
as a Date.ObjectId()
的时间戳部分作为日期。
The following example calls the 以下示例调用getTimestamp()
method on an ObjectId()
:ObjectId()
上的getTimestamp()
方法:
ObjectId("507c7f79bcf86cd7994f6c0e").getTimestamp()
This will return the following output:这将返回以下输出:
ISODate("2012-10-15T21:26:17Z")