Need to convert a value to time

Hello Team,

I’m trying to display last updated time from prometheus pushgateway to Grafana, If I run a metric like “lastupdate{job="job_name"}” it shows time as 53 year something like that.

Eg : I have a value in Prometheus 1685081380 (Friday, May 26, 2023 6:09:40 AM) either in same format or only date and time I want to display it in Grafana dashbaord. Please help me to do it. Thanks

Hi @karthickmj3110 ,

You can try to set the date-time using the built-in function under:

Standard options → Unit → Date & Time

Then it will give you a list of possible options for conversions. Try them out and see which one works for you.

Here is also a screenshot for reference.

image

Let us know if this helps.