Getting the time a card or board was created

If you're in Trello and want to see what time a card was created, open the card, click Share, and you'll see the "Added" time down at the bottom.

Click Share on the back of a card to see its added date.

If you want to know how to find this information via the API or CSV or JSON export, read on.

This page gets a bit technical and assumes you have a bit of knowledge with programming and using the Trello API.

When customers are working with Trello data via the API or via the CSV or JSON export, we often get asked, "what's the dateCreated for the card/board?" There's not one, and while you can query the actions for the card and board and filter on createCard or createBoard actions, you're limited to the most recent 1000 actions using the API, which can be a problem for larger boards.

However, because the objects (cards, boards, lists) use MongoDB, the full ID for every object has additional information embedded in it (see ObjectID for full documentation), including the time it was created. Thus the first 8 characters of the hexadecimal id (the first 4 bytes) represent a Unix timestamp, which can then be translated into a date. Let's take a deeper look.

Detailed Example

We'll walk through a detailed example step by step and then provide code samples below.

Let's try to find when the Trello Development board was created, which has an id of:

1 4d5ea62fd76aa1136000000c

Taking the first 8 characters, we get:

1 4d5ea62f

Converted to a decimal from hexadecimal, the timestamp is:

1 1298048559

This integer is a timestamp (Unix epoch) that represents the number of seconds that have elapsed since January 1, 1970 midnight UTC. It can be converted in most programming languages and sites like EpochConverter. Using the converter, we can see that this board was created on Fri, 18 Feb 2011 17:02:39 GMT. That was really early in Trello's development!

Note that some programming languages require a timestamp to be in milliseconds before converting it to a date, so you'll need to multiply by 1000 before parsing it.

Excel Example

Assuming your object ID is in column A1, use the following formula:

1 =(((HEX2DEC(Left(A1,8))/60)/60)/24)+DATE(1970,1,1)

Javascript Example

1 2 idBoard = "4d5ea62fd76aa1136000000c"; new Date(1000*parseInt(idBoard.substring(0,8),16));

Python Example

1 2 3 4 5 import pytz from datetime import datetime id_board = "4d5ea62fd76aa1136000000c" creation_time = datetime.fromtimestamp(int(id_board[0:8],16)) utc_creation_time = pytz.utc.localize(creation_time)

R Example

1 2 3 cardID = "4d5ea62fd76aa1136000000c" timestamp = strtoi(strtrim(cardID, 8), 16L) dateCrceated = as.POSIXct(timestamp, origin = "1970-01-01")

PHP Example

1 2 3 4 5 <?php $cardID = '4d5ea62fd76aa1136000000c'; $createdDate = date('r', hexdec( substr( $cardID , 0, 8 ) ) ); echo $createdDate; ?>

 

Still need help?

The Atlassian Community is here for you.