Scripted field doc['@timestamp'].date.hourOfDay returs nothing

Hello all,

I'm trying to get the hours of the day that the message was sent at so I can filter for during work hours in kibana but the doc['@timestamp'].date.hourOfDay that is suggested to use in the painless scripting documentation is not working. any advice would be much appreciated

Regards,

This will depend on the context you're running in. It sounds like you are a filter context?

Hello Wylie thank you for the post,

I am trying to filter out the hours so I will be able to see what happened during the hours people were at work. I am not sure of your question I am new to scripted fields in kibana

Yes, please let me know if the examples above help with that. Our documentation for scripted fields is a bit hard to use, but I think that you are close based on the examples I saw.

I still feel very lost after going over the documentation you have supplied unfortunately . I feel like im missing something it doesn't return an error but it also doesn't return a result

the problem seemed to be instead of doc['@timestamp'].date.hourOfDay it is :
doc['@timestamp'].value.hourOfDay

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