Output seconds in hours/minutes - no date

@damrak2022

I tested on some of my data and you are correct in that the HH:MM values are not correct.

Here is some data that I have, which is in hours:

and here is that same data with the unit duration:(hh:mm:ss)

Basically, it thinks that my units were seconds, so 14.9 seconds gets displayed as 00:00:14.

Going back to my Flux query, I was calculating the elapsed time in seconds of a switch state being ON, and then converting it to hours using the map statement. Removing the map() function, we have:

Since the above values are in seconds, we can use the unit duration:(hh:mm:ss) and get this:

So long story short…build a Flux query that returns the value in seconds, then use the unit duration:(hh:mm:ss)

1 Like