How to calculate current date with date in tag value (epoch-format) to create status panel?


I want to create a status panel to check fast if a datasource is up-to-date or failed to update.
If it is the same day (29/11/2020) it should return 0 or else 1. Then I can create a status panel with colors (green = source is updated (0), red = update issue(1))

So far I created a single stat with the date I gave with the the datasource in a tag (influxdb):

So in this case I want to compare the date (29/11/2020) with the current day.

tag(dateinject_epoch) = ‘1606663531216’ from InfluxDB with local time displayed

How can I calculate current date vs my tag field?

update: I figured out a way to make my status update screen. Here a post to explain how and maybe help someone out.

new status panel with 4 data-sources to check if every source is loaded with new data

What you see above are 4 datasources and can see now at a glance if my data in the night is reloaded yes or no.

How to do it:
STEP 1: make a variable with a today timestamp
I retrieve a current DATE by a variable with a regex code (inspired by this source):

Dashboard variable screen in settings

Use a single stat display with a query where the records are matched with the timestamp from step 1.
field ‘dateinject’ is a string field with the same format as the variable; YYYY-MM-DD
If there is a match (so there is a load from the night before (I delete all records and load in a fresh load every run in the night) then I do a count on the records.

With the override function, see screenshot, I remap the value to “OK” and do the collor coding to green with 0%.

If you find I should have done it differently or have some tips, you’re welcome to reply.