# Timestamp at text node

**URL:** https://discourse.nodered.org/t/timestamp-at-text-node/37698
**Category:** Dashboard
**Created:** [18 December 2020 10:45 UTC](https://discourse.nodered.org/t/timestamp-at-text-node/37698 "2020-12-18T10:45:12Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![MKaiser96](https://avatars.discourse-cdn.com/v4/letter/m/8c91f0/32.png) [@MKaiser96](https://discourse.nodered.org/u/MKaiser96)
#### Post date: [18 December 2020 10:45 UTC](https://discourse.nodered.org/t/timestamp-at-text-node/37698/1 "2020-12-18T10:45:13Z")

</div>

Hi,

I want to build a dashboard. Usually I use the text node to visualize my states. Is there any chance to show the timestamp of the last changing of the state? I mean something like this app:

 ![](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/c/0/c08494f3721e072faa79ca283778f889131a2ab0.jpeg)

---

<div class="post-metadata">

### Author: ![vovadpua](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/vovadpua/32/33923_2.png) [@vovadpua](https://discourse.nodered.org/u/vovadpua)
#### Post date: [18 December 2020 15:02 UTC](https://discourse.nodered.org/t/timestamp-at-text-node/37698/2 "2020-12-18T15:02:11Z")

</div>

In the Function node, write

Function 1  
let date = new Date();  
flow.set("date", date);

Function 2  
let FullYear = flow.get("date").getFullYear();  
let getMonth = flow.get("date").getMonth();  
let getDate = flow.get("date").getDate();  
let getHours = flow.get("date").getHours();  
let getMinutes = flow.get("date"). getMinutes();

---

<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: [17 January 2021 15:02 UTC](https://discourse.nodered.org/t/timestamp-at-text-node/37698/3 "2021-01-17T15:02:39Z")

</div>

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