I want convert minutes like (1.78,1.80,1.84,1.95) to (1h:44m,1h.55m,1h.44m,1h.58m)
for example we have 1 hour 95 minutes, but i want 1 hour 58 minutes
This my query
| stats count(eval(status="FAIL")) as fail_count, sum(duration) as hours by ww,kit,endtime
| eval hours = round(((hours/60)/60),2)
| eval hours=round(sum(hours),2)
Could you please help out this
After removing the seconds from my query, I tried with below query
| stats count(eval(status="FAIL")) as fail_count, sum(duration) as hours by ww, kit, endtime
| eval hours=tostring(hours,"duration")
I got the output like this
But i want to sum up all the values, i tried with this command not getting any values
| eval hours=round(sum(hours),2)
Not clear what you mean about removing seconds as they still appear to be in your durations.
What sum are you trying to perform as this would normally be used as an aggregate function to a stats command, not an eval command
After using this command for a duration the values are split in the 1st pick, so I want to sum all the duration values into a single line like in pick 2
| stats count(eval(status="FAIL")) as fail_count, sum(duration) as hours by ww, kit, endtime
| eval hours=tostring(hours,"duration")
Neither of these pictures relate to the search query you say you are using so I am not sure how to advise you further
yes, this picture is related to query
How are they related? One has a field called hours and the picture has a field called Duration_in_Hrs. One looks like it produces single value fields and the other appears to produce multi-value fields.
| stats count(eval(status="FAIL")) as fail_count, sum(duration) as hours by ww,kit,endtime
| eval hours=tostring(hours,"duration")
Admittedly, this will give you HH:MM:SS but you could remove the seconds from hours beforehand if you need to