Date format in Index template kibana

Can you please help me with the correct format for Date that I can give in my index mapping template to get the date in Epoch format.
I am getting the date from source in epoch format like this "1624348829313". I want it in the same way in Kibana also.

Can you do a POST of the date and check how the format looks like?

For ex:

when is post this data:

    POST test/doc
    {"date": {
              "value": "1495956650"
            } 
    }

Elasticsearch uses by default ms since epoch.

Hi @rashmi ,
I don't have permissions to use the Dev tools. Can you please suggest the format that I can apply in the index mapping template itself.

Elasticsearch stores dates as epoch format, but will return them as ISO8601 (from here);

Internally, dates are converted to UTC (if the time-zone is specified) and stored as a long number representing milliseconds-since-the-epoch.

I don't know how to tell Kibana to natively only show epoch, I can't find anything that does that as it's not really human-readable. The only way I can think would be to store the epoch time as a long and not a date and then use that. But again, it's not really friendly.

1 Like

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