Convert millisecond epoch time to ISO human readable time

I have a field that is represented in milliseconds since epoch. I want to use this field as the x axis of a histogram bar chart but I want the dates to be human readable. See the screenshot of what it looks like now. What are some ways to do this?

1 Like

It looks like you are storing the epoch as an integer. You have to specify something like this in your index mapping
"startTime": {
"format": "epoch_millis",
"type": "date"

1 Like

@murlin99 Thanks. That makes sense. Unfortunately, I didn't create the original mapping. It's created by a third party plugin to Jenkins build server. I'm just getting familiar with Kibana. Is this something I should be able to do from the Management tab in Kibana? The type doesn't seem to be editable.

Is there a way to make a field that is derived from the startTime field with the appropriate type and format?

I was able to solve this using a scripted field. I understand that this isn't the most performant way to do it but it works. This is what I came up with for the scripted field:

1 Like

That is exactly what I was going to suggest in that situation. I have had to use painless in a few area's one of them being the same issue you were dealing with.

Cool you got it working.

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