Kibana Timeserie data on select timerange

Hello,

I have some index with data.
@timestamp is unix timestamp.

how do for have a timseries grafic with data only between 08h-20h every day ?

hi @Nibeckj,

create a scripted-field https://www.elastic.co/guide/en/kibana/current/scripted-fields.html on your index pattern that reads out the hour.

There's an example on how to get the hour from a timestamp here https://www.elastic.co/blog/using-painless-kibana-scripted-fields . Scroll down to * **Example** : Parse date into hour-of-day". Make sure the @timestamp field is of type: date in the Elasticsearch-mapping.

Then you can create a between filter in Kibana on that scripted-field, where the value needs to be between 8 and 20.

Hello @thomasneirynck,

Thnaks for your answer.
It's good with scriplet.

Hours Of Day : doc['@timestamp'].value.hourOfDay
Days Of Week : doc['@timestamp'].value.dayOfWeek