First off, the following closed thread is related and it would have been nice to comment there:
I’m doing the same, querying and parsing activity_log
queries. I’ve validated that the following Python/Pandas code converts Monday.com Unix timestamps correctly:
import pandas as pd
pd.to_datetime(16155031105053254 / 10000000, unit='s')
>> Timestamp('2021-03-11 22:51:50.505325312')
But the following also works:
pd.to_datetime(16155031105053254 / 10000, unit='ms')
>> Timestamp('2021-03-11 22:51:50.505325312')
pd.to_datetime(16155031105053254 / 10, unit='us')
>> Timestamp('2021-03-11 22:51:50.505325568')
pd.to_datetime(16155031105053254 * 100, unit='ns')
Timestamp('2021-03-11 22:51:50.505325400')
My question is where is the documentation for these timestamps? The above linked thread was the only reference I could find on the units for this value. The v2 API documentation says only this:
created_at !String The time of the event in 10 digit unix time.
which does not describe the units this integer represents.
Additionally, the activity_log
arguments from
and to
are described in the docs as:
from ISO8601DateTime
From timestamp (ISO8601).
to ISO8601DateTime
To timestamp (ISO8601).
but I can find no description of the ISO8601DateTime
object (as it appears to be formatted to describe). The name is of course in reference to ISO 8601 timestamp formatting (see ISO 8601 - Wikipedia), but does not help understand what strings are supported (i.e. ‘2021-07-18T00:00:00Z’ or ‘2021-07-18T00:00:00+00:00’?)
In the end, my GraphQL arguments were:
activity_logs (page: 1, limit: 25, from: "2021-03-11T00:00:00Z", to: "2021-03-12T00:00:00Z")
Note that the ISO 8601 timestamp is a string with double quotes.
It would be nice if the API examples included use of all the arguments and some of these timestamp details were included in the API docs.