How do you get the date an object in Trello was created?

Not all Trello objects have obvious “createdAt” dates. How do I know when a Trello object was first created?

Because Trello uses MongoDB for data persistence, the IDs of all of the objects are Mongo IDs. Mongo IDs have the object creation date encoded in them.

There is a very handy tool that makes it easy to check IDs by hand. You can find it here: https://steveridout.github.io/mongo-object-time/

For example, if we take a look at this public board: https://trello.com/1/boards/5974d4df3e19366f9a1b95f2. We see that its ID is 5974d4df3e19366f9a1b95f2. When we pop that ID into the tool above, we get the following timestamp: 2017-07-23T16:54:55.000Z.

They are also nice enough to share the javascript required to make the conversion ourselves:

var objectIdFromDate = function (date) {
  return Math.floor(date.getTime() / 1000).toString(16) + "0000000000000000";
};

var dateFromObjectId = function (objectId) {
  return new Date(parseInt(objectId.substring(0, 8), 16) * 1000);
};