node-red-contrib-simpletime 2.0.5

A lightweight node-red node to provide and format date and time.

npm install node-red-contrib-simpletime

A Node-RED node that is extremely lightweight and which can be inserted in any running flow, and adds time and date payloads with various formatting options, which can be retreived and used later in the flow.


Run the following command in your Node-RED user directory - typically ~/.node-red

npm install node-red-contrib-simpletime



Any existing payloads or topics being injected into simpletime will pass unaltered through the node.


In addition to any existing payloads, a number of additional payloads will be added, which can be utilised later in the flow.


The additional payloads added to the flow, and their typical content format are;

  • msg.myrawdate: "2017-11-08T20:36:26.257Z"
  • msg.myepoch: 1510173386257
  • msg.mydate: "Wed Nov 08 2017"
  • msg.myhour: "20"
  • msg.myminute: "36"
  • msg.myminutes: "36:26"
  • msg.mysecond: "26"
  • msg.mytime: "20:36"
  • msg.mytimes: "20:36:26"

To introduce any of the messages into a flow, simply assign any, or any combination of the messages into a variable, such as; var seconds = msg.myseconds; or to use in a ui_text node add via mustache {{msg.mytimes}}

For more advanced timezone handling, node-red-contrib-moment is recommended.

Node Info

Version: 2.0.5
Updated 2 weeks ago
License: Apache-2.0


9 in the last day
69 in the last week
326 in the last month


  • simpletime


  • node-red
  • time
  • date
  • moment


  • rossoreed