Convert Minutes in to hour in Kibana field "TotalDuration"

Hi,
I calulating sum of TotalDuration field in kibana , TotalDuration field is in Minutes.
i want to convert minutes in to Hours while dispalying in kibana visulization .

I tried json input :
{
"script": {
"inline1":"doc['TotalDuration'].value / 60",
"lang":"painless"
}
}

getting visulization error . Please advise.

Hi @Vivek_Nigam. "getting visualization error" does not give us enough information. Do you see specific errors in your browser? Maybe you can share a screenshot?

1 Like

Thanks , Now i am getting the value using below script but output hours are not correct.
{
"script": {
"inline":"doc['sessionDurationMinutes'].value/60",
"lang":"painless"
}
}

Hours Value getting:
image

But correct Hours value is :
image

Hi @Vivek_Nigam. What version of Kibana are you using? Also, what is the mapping for the fields you are using?

Kibana version :7.9.1

Thanks. Can you also answer this?

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