# Set time function on dashboard

**URL:** <https://discourse.nodered.org/t/set-time-function-on-dashboard/24008>\
**Category:** General\
**Created:** [1 April 2020 06:08 UTC](https://discourse.nodered.org/t/set-time-function-on-dashboard/24008 "2020-04-01T06:08:36Z")\
**Posts on this page:** 1\
**Showing post:** 32

<div class="post-metadata">

**Author:** ![JGKK](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/jgkk/32/18515_2.png) [@JGKK](https://discourse.nodered.org/u/JGKK)\
**Post date:** [7 April 2020 05:24 UTC](https://discourse.nodered.org/t/set-time-function-on-dashboard/24008/32 "2020-04-07T05:24:51Z")

</div>

why don’t you load the data straight from the spreadsheet?  
You can either use the [https://flows.nodered.org/node/node-red-contrib-spreadsheet-in](https://flows.nodered.org/node/node-red-contrib-spreadsheet-in) to load excel workbooks directly or you save it as an csv and use the inbuild nodes for it. No reason to go via the dashboard.  
to convert hh,mm to hh:mm:

```auto
const msgformat = msg.payload.replace(/\,/g,":");
msg.payload = msgformat;
return msg;

```

this uses the replace method [https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global\_Objects/String/replace](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/replace) and a regex to search for an , and replace it with a :  
Johannes

Edit: Can you give as an example on what the data in the spreadsheet looks like? This would make this a whole lot easier?

Edit2: You can even load directly from a google spreadsheet: [Google Spreasheet zu Node Red](https://discourse.nodered.org/t/google-spreasheet-zu-node-red/23608/7)

---

_[View the full topic](https://discourse.nodered.org/t/set-time-function-on-dashboard/24008)._
