Converting

MongoDB ObjectId to Timestamp

The first four bytes of an ObjectId are the second it was created in, so 507f1f77bcf86cd799439011 carries a date without a field to hold one. The other direction builds the lowest ObjectId for a moment in time, which is the bound you want for a range query on _id .

ObjectId

0 chars · 0 words · 0 lines

Get QR code
Copy to clipboard
Save to file

Timestamp

0 chars · 0 words · 0 lines

Get QR code
Copy to clipboard
Save to file
Share

marduc812

SourcePrivacy

© 202620260908_dbfb472