Skip to main content

Date format of activity_log.created_at field

  • June 4, 2020
  • 4 replies
  • 4154 views

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.

Thanks

This topic has been closed for replies.

4 replies

dipro
Forum|alt.badge.img
  • Leader
  • June 15, 2020

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!


  • Author
  • New Participant
  • June 16, 2020

Perfect - thanks for your time.


kaminskypavel
  • Participating Frequently
  • August 19, 2020

oh wow… that was unexpected 😆
thanks for clarifying


AlexSavchuk
Forum|alt.badge.img
  • monday.com Team Member
  • August 19, 2020

Hey @kaminskypavel 👋

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 🙂

-Alex