'Get the hours of a timestamp and display in grafana
For my Grafana panel i would like to extract and display the hours of a date from a given timestamp series
For example the timestamp 1628274040 which is 2021-08-06 18:20:40 (CET) i would like to only have "18:20:40" and display this comparable in my panel (display as graph).
How to do that? The underlying data is influxDB and the query is influxQL. I searched the grafana dashboard for converting function but dont find any.
Solution 1:[1]
I do not understand how you imagine to present this data in Grafan graph panel. But I know that there is possibility to make it as a table with Datatable Panel Plugin by setting "Column Style" of "Time" as "HH:mm:ss". It will allow you to present your data as a table with format exactly as you described. Realisation example - image
Solution 2:[2]
This will return current date, like "24/05/22": ${__to:date:DD/MM/WW}
This will return Timestamp from today date, like "1653447599999": ${__to}
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Crashtein |
| Solution 2 |
