# Dashboard last update state to dashboard

**URL:** <https://discourse.nodered.org/t/dashboard-last-update-state-to-dashboard/85093>\
**Category:** Dashboard\
**Tags:** node-red-dashboard\
**Created:** [31 January 2024 20:46 UTC](https://discourse.nodered.org/t/dashboard-last-update-state-to-dashboard/85093 "2024-01-31T20:46:06Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![nodouser](https://avatars.discourse-cdn.com/v4/letter/n/a9adbd/32.png) [@nodouser](https://discourse.nodered.org/u/nodouser)\
**Post date:** [31 January 2024 20:46 UTC](https://discourse.nodered.org/t/dashboard-last-update-state-to-dashboard/85093/1 "2024-01-31T20:46:06Z")

</div>

Hello,

I like to have the date and time, when a sensor has send the last update.  
Is that possible and make it visible in my dashboard?

payload.LastUpdate  
LastUpdate: "2024-01-31 21:44:07"

---

<div class="post-metadata">

**Author:** ![MecatronicaMADE](https://avatars.discourse-cdn.com/v4/letter/m/ce7236/32.png) [@MecatronicaMADE](https://discourse.nodered.org/u/MecatronicaMADE)\
**Post date:** [31 January 2024 22:07 UTC](https://discourse.nodered.org/t/dashboard-last-update-state-to-dashboard/85093/2 "2024-01-31T22:07:54Z")

</div>

I think it is possible, what you need to do is to store the timestamp value in one of the message properties and maybe display it in a "text-ui" node, for example:

![timestamp](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/a/d/adcac4c263d4eb390f6381e4d5e0e340406cef89.png)

```auto
[{"id":"59bf320746c27a02","type":"tab","label":"Flow 17","disabled":false,"info":"","env":[]},{"id":"b29faeea26b2104e","type":"inject","z":"59bf320746c27a02","name":"Sensor simulation","props":[{"p":"payload"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"43.25","payloadType":"num","x":290,"y":280,"wires":[["90bfcf4d064627b3"]]},{"id":"655664533c8ebf1a","type":"ui_text","z":"59bf320746c27a02","group":"e4b721e97dc05fb0","order":2,"width":0,"height":0,"name":"","label":"Last update:","format":"{{lastUpdate}}","layout":"row-center","className":"","style":false,"font":"","fontSize":16,"color":"#000000","x":690,"y":280,"wires":[]},{"id":"859f321548c05717","type":"debug","z":"59bf320746c27a02","name":"debug 33","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"lastUpdate","targetType":"msg","statusVal":"","statusType":"auto","x":680,"y":320,"wires":[]},{"id":"90bfcf4d064627b3","type":"function","z":"59bf320746c27a02","name":"Format Time","func":"var d = new Date();\nvar options = { timeZone: 'UTC', year: 'numeric', month: '2-digit', day: '2-digit', hour: `2-digit`, minute: `2-digit`, second: `2-digit`};\nvar _resultDate = d.toLocaleDateString('en-US', options);\nmsg.lastUpdate = _resultDate;\nreturn msg;","outputs":1,"timeout":"","noerr":1,"initialize":"","finalize":"","libs":[],"x":490,"y":280,"wires":[["655664533c8ebf1a","859f321548c05717","086c5fdc5bb69245"]]},{"id":"086c5fdc5bb69245","type":"ui_text","z":"59bf320746c27a02","group":"e4b721e97dc05fb0","order":2,"width":0,"height":0,"name":"","label":"Sensor value:","format":"{{payload}}","layout":"row-center","className":"","style":false,"font":"","fontSize":16,"color":"#000000","x":700,"y":240,"wires":[]},{"id":"e4b721e97dc05fb0","type":"ui_group","name":"Group 1","tab":"1e418ad18af41c84","order":1,"disp":true,"width":6},{"id":"1e418ad18af41c84","type":"ui_tab","name":"Tab 2","icon":"dashboard","order":2}]

```

hope you find the info useful.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)\
**Post date:** [1 March 2024 22:08 UTC](https://discourse.nodered.org/t/dashboard-last-update-state-to-dashboard/85093/3 "2024-03-01T22:08:42Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
