# Date and time table to send messages

**URL:** https://discourse.nodered.org/t/date-and-time-table-to-send-messages/32429
**Category:** General
**Created:** [4 September 2020 05:12 UTC](https://discourse.nodered.org/t/date-and-time-table-to-send-messages/32429 "2020-09-04T05:12:13Z")
**Posts on this page:** 9
**Page:** 1

<div class="post-metadata">

### Author: ![lalo](https://avatars.discourse-cdn.com/v4/letter/l/f4b2a3/32.png) [@lalo](https://discourse.nodered.org/u/lalo)
#### Post date: [4 September 2020 05:12 UTC](https://discourse.nodered.org/t/date-and-time-table-to-send-messages/32429/1 "2020-09-04T05:12:13Z")

</div>

Hi, guys a time ago I asked about a table on the dashboard to paste the hour to send on/off messages to a `mqtt out node` so I want to do the same but with an specific date. I will paste my flow.

```auto
[{"id":"fa431dfa.cb60b","type":"tab","label":"Flow 4","disabled":false,"info":""},{"id":"59638d89.eec624","type":"debug","z":"fa431dfa.cb60b","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":1190,"y":340,"wires":[]},{"id":"8bbbbc4a.69089","type":"function","z":"fa431dfa.cb60b","name":"","func":"var msgOut = msg.payload;\nflow.set(\"msgOut\", msgOut);\nmsg.payload = msgOut;\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":1040,"y":340,"wires":[["59638d89.eec624"]]},{"id":"44d5c2c4.5ed13c","type":"function","z":"fa431dfa.cb60b","name":"check command","func":"const time = new Date(msg.payload);\nconst hour = time.getHours();\nconst minute = time.getMinutes();\nlet timef = \"\";\nif(minute<10){\n if(hour>9){\n timef = String(hour) + \":0\" + String(minute);\n } else {\n timef = \"0\"+ String(hour) + \":0\" + String(minute);\n }\n} else {\n if(hour>9){\n timef = String(hour) + \":\" + String(minute);\n } else {\n timef = \"0\"+ String(hour) + \":\" + String(minute);\n }\n}\nconst msgOut = flow.get(\"msgOut\");\nmsgOut.forEach(element => {\n if(element.time == timef) node.send({payload:element.command,item:element.item});\n});\nnode.done();\nreturn;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":460,"y":440,"wires":[["fe38512d.2ec09","6b650a61.620c94"]]},{"id":"2c7bdbc6.ff09f4","type":"inject","z":"fa431dfa.cb60b","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"60","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":270,"y":440,"wires":[["44d5c2c4.5ed13c"]]},{"id":"fe38512d.2ec09","type":"debug","z":"fa431dfa.cb60b","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","x":630,"y":440,"wires":[]},{"id":"6b650a61.620c94","type":"mqtt out","z":"fa431dfa.cb60b","name":"","topic":"","qos":"","retain":"","x":650,"y":540,"wires":[]},{"id":"e9ae4e1b.47dbc","type":"change","z":"fa431dfa.cb60b","name":"ui_control & placeholder","rules":[{"t":"set","p":"ui_control","pt":"msg","to":"{\"customHeight\":20,\"tabulator\":{\"layout\":\"fitColumns\",\"clipboard\":true,\"clipboardCopySelector\":\"table\",\"clipboardCopyStyled\":false,\"clipboardPasteAction\":\"function(rowData){ this.send({ui_control:{callback:'clipboardPasteAction'},payload:rowData}); return this.table.replaceData(rowData); }\",\"columns\":[{\"field\":\"col1\",\"title\":\"Column #1\"},{\"field\":\"col2\",\"title\":\"Column #2\"},{\"field\":\"col3\",\"title\":\"Column #3\"}]}}","tot":"json"},{"t":"set","p":"payload","pt":"msg","to":"[{\"col1\":\"click here & CTRL+v\",\"col2\":\"or click here & CTRL+v\",\"col3\":\"or click here & CTRL+v\"},{\"col1\":\" or on any other cell\",\"col2\":\"\",\"col3\":\"\"},{\"col1\":\"\",\"col2\":\"\",\"col3\":\"\"},{\"col1\":\"\",\"col2\":\"\",\"col3\":\"\"},{\"col1\":\"\",\"col2\":\"\",\"col3\":\"\"},{\"col1\":\"\",\"col2\":\"\",\"col3\":\"\"},{\"col1\":\"\",\"col2\":\"\",\"col3\":\"\"},{\"col1\":\"\",\"col2\":\"\",\"col3\":\"\"},{\"col1\":\"\",\"col2\":\"\",\"col3\":\"\"},{\"col1\":\"\",\"col2\":\"\",\"col3\":\"\"},{\"col1\":\"\",\"col2\":\"\",\"col3\":\"\"},{\"col1\":\"\",\"col2\":\"\",\"col3\":\"\"},{\"col1\":\"there is a issue with small or empty tables\",\"col2\":\"will be dixed soon\",\"col3\":\"\"},{\"col1\":\"Untill then we have\",\"col2\":\"to fill in some\",\"col3\":\"dummy lines\"}]","tot":"json"}],"action":"","property":"","from":"","to":"","reg":false,"x":470,"y":340,"wires":[["b3e1ceb0.2f843"]]},{"id":"dbe41bc.e96b6e8","type":"debug","z":"fa431dfa.cb60b","name":"clipboardPasteAction","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","x":1100,"y":300,"wires":[]},{"id":"b3e1ceb0.2f843","type":"ui_table","z":"fa431dfa.cb60b","group":"dddd0a60.dd20e8","name":"Copy & Paste","order":1,"width":"17","height":"7","columns":[],"outputs":1,"cts":true,"x":712,"y":340,"wires":[["3d5eccb0.6cc844"]]},{"id":"3b00a1b3.99ab1e","type":"ui_ui_control","z":"fa431dfa.cb60b","name":"on tab change","events":"change","x":253,"y":340,"wires":[["e9ae4e1b.47dbc"]]},{"id":"3d5eccb0.6cc844","type":"switch","z":"fa431dfa.cb60b","name":"","property":"ui_control.callback","propertyType":"msg","rules":[{"t":"eq","v":"clipboardPasteAction","vt":"str"},{"t":"else"}],"checkall":"true","repair":false,"outputs":2,"x":886,"y":340,"wires":[["dbe41bc.e96b6e8","8bbbbc4a.69089"],["44d0fe85.d8507"]]},{"id":"44d0fe85.d8507","type":"debug","z":"fa431dfa.cb60b","name":"something else","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","x":1060,"y":380,"wires":[]},{"id":"dddd0a60.dd20e8","type":"ui_group","z":"","name":"ui-table Copy & Paste","tab":"39ebf361.3595cc","order":1,"disp":true,"width":"17","collapse":false},{"id":"39ebf361.3595cc","type":"ui_tab","z":"","name":"ui-table test","icon":"dashboard","disabled":false,"hidden":false}]

```

---

<div class="post-metadata">

### Author: ![zenofmud](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/zenofmud/32/316_2.png) [@zenofmud](https://discourse.nodered.org/u/zenofmud)
#### Post date: [4 September 2020 08:27 UTC](https://discourse.nodered.org/t/date-and-time-table-to-send-messages/32429/2 "2020-09-04T08:27:29Z")

</div>

Can you explain what this flow is suppose to do? It doesn't seem like your table does anything - i.e. you don't add data to it fro the flow and you can't update it in the dashboard.

---

<div class="post-metadata">

### Author: ![lalo](https://avatars.discourse-cdn.com/v4/letter/l/f4b2a3/32.png) [@lalo](https://discourse.nodered.org/u/lalo)
#### Post date: [4 September 2020 15:54 UTC](https://discourse.nodered.org/t/date-and-time-table-to-send-messages/32429/3 "2020-09-04T15:54:28Z")

</div>

Can you help me? @JGKK

---

<div class="post-metadata">

### Author: ![zenofmud](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/zenofmud/32/316_2.png) [@zenofmud](https://discourse.nodered.org/u/zenofmud)
#### Post date: [4 September 2020 16:43 UTC](https://discourse.nodered.org/t/date-and-time-table-to-send-messages/32429/4 "2020-09-04T16:43:45Z")

</div>

Ok, since you don’t want to answer a simple question I out of here. Good luck with your issue.

---

<div class="post-metadata">

### Author: ![lalo](https://avatars.discourse-cdn.com/v4/letter/l/f4b2a3/32.png) [@lalo](https://discourse.nodered.org/u/lalo)
#### Post date: [4 September 2020 16:57 UTC](https://discourse.nodered.org/t/date-and-time-table-to-send-messages/32429/6 "2020-09-04T16:57:29Z")

</div>

![copy-paste](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/d/4/d4f7d64aee7f5f13344aa0375d6985242f9e31a8.gif)

---

<div class="post-metadata">

### Author: ![lalo](https://avatars.discourse-cdn.com/v4/letter/l/f4b2a3/32.png) [@lalo](https://discourse.nodered.org/u/lalo)
#### Post date: [4 September 2020 17:11 UTC](https://discourse.nodered.org/t/date-and-time-table-to-send-messages/32429/7 "2020-09-04T17:11:03Z")

</div>

so in my first column I'm going to set the time and date to do the action ![new schedueld](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/f/f/ff17a6fed5bc33d5f8cba9d6c09dad3e4ff05f1d.png)  
so that's all that I want add the date

---

<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: [4 September 2020 18:40 UTC](https://discourse.nodered.org/t/date-and-time-table-to-send-messages/32429/8 "2020-09-04T18:40:59Z")

</div>

Im sorry im on holiday right now and only have my phone and no access to any of my nodered instances.

---

<div class="post-metadata">

### Author: ![lalo](https://avatars.discourse-cdn.com/v4/letter/l/f4b2a3/32.png) [@lalo](https://discourse.nodered.org/u/lalo)
#### Post date: [4 September 2020 18:58 UTC](https://discourse.nodered.org/t/date-and-time-table-to-send-messages/32429/9 "2020-09-04T18:58:01Z")

</div>

@JGKK enjoy your holiday. you deverve it

---

<div class="post-metadata">

### Author: ![lalo](https://avatars.discourse-cdn.com/v4/letter/l/f4b2a3/32.png) [@lalo](https://discourse.nodered.org/u/lalo)
#### Post date: [24 October 2020 21:30 UTC](https://discourse.nodered.org/t/date-and-time-table-to-send-messages/32429/12 "2020-10-24T21:30:18Z")

</div>

Are you available to help me? sorry for asking
