Display sample time in (or near) a Gauge

Ver 11.2.0 running on RaspberryPi 4B Bookworm 12

I’d like to be able to display the last sample time along with the last data values from an Influx DB time series on (or near) gauges. I don’t see a way to display the time of the last sample.

Add a stat panel, use gauge’s query as datasource and display time in this stat panel.

I’ve done that but the time displayed is not the last sample time associated with the temperature value. The data rate is 5m per sample and the time seems to change while waiting for the next sample. It’s sort of, but not actually, real time so not coming from the influxdb.

I stumbled on the answer. See the query below.