Creating a new date field by splitting an existing timestamp in Kibana 5.0.0


(Kulasangar Gowrisangar) #1

I already have an index which contains data from a MySQL database and I wanted use Histogram aggregation Kibana so that I can show a vertical bar chart or a data table for every single day.

The problem I'm having is that, I don't particularly have, a day or a month or an year field in my db separately. What I have is a timestamp field in my table, like as follows:

How can i create a scripted field or is there any other way in Kibana to get only the day, month and the year from the timestamp so that I can include it in the histogram.

Any help could be appreciated.


(CJ Cenizal) #2

Hi Kulasangar,

Nice to hear from you again! I think you want to adjust your Elasticsearch mapping to format the field as a Date: https://www.elastic.co/guide/en/elasticsearch/reference/current/mapping-date-format.html. Please let me know if this helps!

Thanks,
CJ


(system) #3