[Help] Display Concurrency between 2 date-type

I have 2 date-type:

  • "timestamp_pickup_at" : "2021-09-06T04:10:28.070Z",
  • "timestamp_hangup_at" : "2021-09-06T04:10:36.022Z"

I want to visualize that as a conccurency date histogram.
I refer to this topic but not work.

This is my INPUT JSON:

Help me, please.

Hello @hoaf13

Welcome to our community!

It seems that the script that you copied is pretty old. Can you try with this updated one?

"script": "def start = doc['start_date'].value; def duration = doc['duration'].value*1000*1000; def l = []; for (long i = 0; i < duration; i += 60000) { l.add(start + i); }; return l;",

Cheers
Sébastien

Sorry for late replying, thanks for your support but it do not work for me

It announces that: Do not add date field to int field. :frowning:

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.