- Reference >
mongoShell Methods >- Object Constructors and Methods >
- ObjectId.getTimestamp()
ObjectId.getTimestamp()¶
On this page
-
ObjectId.getTimestamp()¶ Returns the timestamp portion of the
ObjectId()as a Date.
Example¶
The following example calls the getTimestamp() method on an ObjectId():
This will return the following output:
See also