Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8446433
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T09:55:57+00:00 2026-06-10T09:55:57+00:00

Mongodb object id is a byte array which lot of information is packed into

  • 0

Mongodb object id is a byte array which lot of information is packed into the byte array as follows:

http://www.mongodb.org/display/DOCS/Object+IDs#ObjectIDs-TheBSONObjectIdDatatype

ie: given an id 47cc67093475061e3d95369d it contains datetime, machine, id, and inc information. how do they store all these information into the id?

how are they doing this? how does byte packing is happening?

is there an example to represent this?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-10T09:55:59+00:00Added an answer on June 10, 2026 at 9:55 am

    The time is seconds since Jan-1-1970, which in their example is 1,204,578,057.

    For the binary representation, 1204578057 (base 10) is 47cc6709 (base 16). There’s nothing to do. That’s just how it looks to the computer.

    To convert that value to a string (for the ObjectId method), just call ToString with “X”:

    1204578057.ToString("X")
    

    The structure itself is fully defined here — BSONObjectIDSpecification.

    You may also want to research struct layouts here: http://msdn.microsoft.com/en-us/library/system.runtime.interopservices.structlayoutattribute.aspx

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

http://www.mongodb.org/display/DOCS/Dot+Notation+(Reaching+into+Objects ) In the docs, all the samples use dot notation to find a
I have a mongodb object as follows: array ( '_id' => new MongoId(4cc97fb0247ae8747ec5fefb), 'posts'
Is there any way to save an array of JSON object to a mongodb
I'm attempting to send a JSON encoded MongoDB object back in my HTTP response.
I'm trying to persist an object into a MongoDB, using the following bit of
I have the following MongoDB object stored in my Mongo database: array ( '_id'
I've run into problem when testing insert into mondgodb python object which was extracted
I am trying to insert a whole Java object into a MongoDB Collection using
I would love to sort an embedded MongoDB object using PHP Lithium. I have
I'm trying to send JSON-object form MongoDB to page with ejs template engine. Here's

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.