Date format of activity_log.created_at field

Hi, I’m building an integration and I cannot see how to convert the activity_log.created_at field from an integer to a date. Cannot find anything in your KB, nor online in general.

An example of a returned “date” field is “15905438472681046”, which corresponds to approx May 28th 2020 (give or take a few days)

The number is too big to be Unix Epoch.


Hey @benliebert – good question.

The date returned by the activity_logs field is Unix time to 17 digits of accuracy.

In Javascript, you can convert this to a date function by dividing it by 10,000 like so:
myDate = new Date(15905438472681046 / 10000)

Here’s what that looks like in the console:

Hope that helps!

Perfect - thanks for your time.

1 Like

oh wow… that was unexpected :laughing:
thanks for clarifying

1 Like

Hey @kaminskypavel :wave:

I’m glad @dipro could shed some light on this! That said, I truly appreciate you searching through the forum instead of creating a new topic about this - thanks so much :slight_smile: