Show time stamp for a field value

HI,
I would like to show a nice formatted timestamp for the last value in the DB for a field.
How do I get the timestamp and how do I format it?

1 Like

Which data source? Might be possible to return it as a string depending on the database you are using.

I am using InfluxDB.

Not an InfluxDB expert but I don’t think it is possible. From the second link below:

Unfortunately, InfluxDB doesn’t allow you to do a query only for a time, and Grafana doesn’t let you choose which field to display in a Singlestat panel

Doesn’t seem to be possible to select just a time column: https://github.com/influxdata/influxdb/issues/84

There are some open issues for this:

1 Like

Actual it’s possible to select the timestamp in SingleStat Panel, If I choose table, but it show only the raw value. Is it not possible to format it as timestamp?

Oh interesting. I tried that but couldn’t figure out the query. What does your query look like? Is it being returned as an epoch?

Don’t know. Maybe there is an Influxdb function for formatting dates?

1 Like