How display "date,value of sensor" in node red

Hi everyone,
my problem is how to display my data with date, for exemple "2022-04-17, 321.76".

Welcome to the forum!

You need to tell us a little more about what you are trying to do. Where is the data coming from? Where do you want to display the results?

Data from plc 's7 node' and send data to firebase
the value in s7 node note display with date

Can you post your flow here please?
Export your flow to the clipboard, press the </> button above and paste your flow between the back ticks.

        "id": "834951a6acc15723",
        "type": "tab",
        "label": "Flow 2",
        "disabled": false,
        "info": "",
        "env": []
        "id": "93828c487a9a0c1d",
        "type": "moment",
        "z": "834951a6acc15723",
        "name": "",
        "topic": "",
        "input": "",
        "inputType": "date",
        "inTz": "Africa/Tunis",
        "adjAmount": 0,
        "adjType": "days",
        "adjDir": "add",
        "format": "YYYY-MM-DD HH:mm:ss",
        "locale": "fr-FR",
        "output": "",
        "outputType": "msg",
        "outTz": "Africa/Tunis",
        "x": 380,
        "y": 140,
        "wires": [
        "id": "1004411dcf989289",
        "type": "firebase modify",
        "z": "834951a6acc15723",
        "name": "DATA3",
        "firebaseconfig": "",
        "childpath": "DATA3",
        "method": "push",
        "value": "msg.payload",
        "priority": "msg.priority",
        "x": 590,
        "y": 140,
        "wires": [
        "id": "da443d2580ef62c3",
        "type": "debug",
        "z": "834951a6acc15723",
        "name": "",
        "active": true,
        "tosidebar": true,
        "console": false,
        "tostatus": false,
        "complete": "false",
        "statusVal": "",
        "statusType": "auto",
        "x": 590,
        "y": 220,
        "wires": []
        "id": "d46ffb655c8b718a",
        "type": "s7 in",
        "z": "834951a6acc15723",
        "endpoint": "d944ccff93391236",
        "mode": "single",
        "variable": "DATA0",
        "diff": true,
        "name": "DATA0",
        "x": 150,
        "y": 140,
        "wires": [
        "id": "d944ccff93391236",
        "type": "s7 endpoint",
        "transport": "iso-on-tcp",
        "address": "",
        "port": "102",
        "rack": "0",
        "slot": "1",
        "localtsaphi": "01",
        "localtsaplo": "00",
        "remotetsaphi": "01",
        "remotetsaplo": "00",
        "connmode": "rack-slot",
        "adapter": "",
        "busaddr": "2",
        "cycletime": "1000",
        "timeout": "2000",
        "name": "",
        "vartable": [
                "addr": "DB1,WORD0",
                "name": "DATA0"

I've just taken your flow and removed the nodes I don't have.
The Date/Time Formatter produces the correct time for me, so I suspect your problem is in the first node.
Screen Shot 05-18-22 at 09.17 AM
Screen Shot 05-18-22 at 09.18 AM

The Date/Time Node works perfect but i want to send date with value.
For exemple here i want send 23 concatinat with date like this: ''2022-05-18 14:42:00 23"

OK- I understand now.

Try this...

[{"id":"93828c487a9a0c1d","type":"moment","z":"834951a6acc15723","name":"","topic":"","input":"","inputType":"date","inTz":"Africa/Tunis","adjAmount":0,"adjType":"days","adjDir":"add","format":"YYYY-MM-DD HH:mm:ss","locale":"fr-FR","output":"date_time","outputType":"msg","outTz":"Africa/Tunis","x":320,"y":240,"wires":[["64ead62bf7b2409b"]]},{"id":"da443d2580ef62c3","type":"debug","z":"834951a6acc15723","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":690,"y":240,"wires":[]},{"id":"03f1675bfde5c458","type":"inject","z":"834951a6acc15723","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"23","payloadType":"num","x":140,"y":240,"wires":[["93828c487a9a0c1d"]]},{"id":"64ead62bf7b2409b","type":"function","z":"834951a6acc15723","name":"","func":"msg.payload = msg.date_time + \" \" +msg.payload;\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":520,"y":240,"wires":[["da443d2580ef62c3"]]}]

Thank you

If you don't want to pass msg.date_time onto further nodes, you can delete with... in the function node.

msg.payload = msg.date_time + " " +msg.payload;

delete msg.date_time;

return msg;

Got it , thanks.

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