本例实现把时间戳转换成可供人阅读的日期和秒格式并存入txt文件.
首先先安装 node-red-contrib-simpletime,安装方法如图:

npm install node-red-contrib-simpletime
可导入代码如下:
[{
"id": "9b114162.97a71",
"type": "tab",
"label": "流程1",
"disabled": false,
"info": ""
}, {
"id": "a30a6c48.6e8f",
"type": "ui_tab",
"z": "",
"name": "Temp",
"icon": "dashboard"
}, {
"id": "4c107418.fdb2bc",
"type": "inject",
"z": "9b114162.97a71",
"name": "",
"topic": "",
"payload": "",
"payloadType": "date",
"repeat": "",
"crontab": "",
"once": false,
"onceDelay": 0.1,
"x": 290,
"y": 200,
"wires": [
["759d788a.a96ee8"]