# How to join two messages of different format?

**URL:** <https://discourse.nodered.org/t/how-to-join-two-messages-of-different-format/57526>\
**Category:** General\
**Tags:** node-red-dashboard, database, mqtt\
**Created:** [30 January 2022 23:04 UTC](https://discourse.nodered.org/t/how-to-join-two-messages-of-different-format/57526 "2022-01-30T23:04:39Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jhontan14](https://avatars.discourse-cdn.com/v4/letter/j/2acd7d/32.png) [@Jhontan14](https://discourse.nodered.org/u/Jhontan14)\
**Post date:** [30 January 2022 23:04 UTC](https://discourse.nodered.org/t/how-to-join-two-messages-of-different-format/57526/1 "2022-01-30T23:04:39Z")

</div>

Hello !  
I need to join two messages in the same mode to be able to upload to AWS Iot, add the no to format the time because node red does not show me the time of my region. I have been reviewing youtube forums and videos for several days, I am new to this platform, I would be very grateful for your help.

 ![Captura de pantalla (490)](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/8/8/88ddc49e0271aa40641b63ef4e7dd8b79733b2b4.png)

```auto
[{"id":"870e3dea.43e1e","type":"tab","label":"Flow 2","disabled":false,"info":""},{"id":"321f3c38.7b8f64","type":"ui_form","z":"870e3dea.43e1e","name":"","label":"","group":"eccfb0b5.c7841","order":3,"width":"6","height":"15","options":[{"label":"Ingrese proveedor","value":"proveedor","type":"text","required":false,"rows":null},{"label":"Identificación Interna","value":"interna","type":"number","required":false,"rows":null},{"label":"Identificación externa","value":"Externa","type":"number","required":false,"rows":null},{"label":"Fecha de ingreso","value":"Fecha","type":"date","required":false,"rows":null},{"label":"Hora","value":"Hora","type":"time","required":false,"rows":null}],"formValue":{"proveedor":"","interna":"","Externa":"","Fecha":"","Hora":""},"payload":"","submit":"Enviar","cancel":"Cancelar","topic":"datos","topicType":"msg","splitLayout":false,"className":"","x":170,"y":380,"wires":[["3b53af26.72e7","7071c6f3.0a30c8"]]},{"id":"3b53af26.72e7","type":"change","z":"870e3dea.43e1e","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"payload.Hora","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":320,"y":420,"wires":[["5ebe2e2b.da06b"]]},{"id":"7071c6f3.0a30c8","type":"change","z":"870e3dea.43e1e","name":"","rules":[{"t":"delete","p":"payload.Hora","pt":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":350,"y":240,"wires":[["a62a6312.250f1"]]},{"id":"5ebe2e2b.da06b","type":"moment","z":"870e3dea.43e1e","name":"","topic":"HoraF","input":"payload","inputType":"msg","inTz":"America/Guayaquil","adjAmount":0,"adjType":"days","adjDir":"add","format":" HH-mm-ss","locale":"es-EC","output":"payload","outputType":"msg","outTz":"America/Guayaquil","x":510,"y":440,"wires":[["2d86d5aa.f8430a"]]},{"id":"a62a6312.250f1","type":"debug","z":"870e3dea.43e1e","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":690,"y":260,"wires":[]},{"id":"2d86d5aa.f8430a","type":"debug","z":"870e3dea.43e1e","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":690,"y":440,"wires":[]},{"id":"eccfb0b5.c7841","type":"ui_group","name":"Datos cafrilosa","tab":"e76a9497.de2648","order":1,"disp":true,"width":"6","collapse":false,"className":""},{"id":"e76a9497.de2648","type":"ui_tab","name":"Ingreso de datos Cafrilosa","icon":"dashboard","disabled":false,"hidden":false}]

```

---

<div class="post-metadata">

**Author:** ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)\
**Post date:** [30 January 2022 23:13 UTC](https://discourse.nodered.org/t/how-to-join-two-messages-of-different-format/57526/2 "2022-01-30T23:13:43Z")

</div>

> [@Jhontan14](#):
>
> I need to join two messages in the same mode to be able to upload to AWS Iot

See [this article in the cookbook](https://cookbook.nodered.org/basic/join-streams) for an example of how to join messages into one object.

NOTE: Ensure both messages have unique topics. (set topic in the change node)

> [@Jhontan14](#):
>
> I am new to this platform, I would be very grateful for your help.

I recommend watching this playlist: [Node-RED Essentials](https://www.youtube.com/playlist?list=PLyNBB9VCLmo1hyO-4fIZ08gqFcXBkHy-6). The videos are done by the developers of node-red. They're nice & short and to the point. You will understand a whole lot more in about 1 hour. A small investment for a lot of gain.

---

<div class="post-metadata">

**Author:** ![jbudd](https://avatars.discourse-cdn.com/v4/letter/j/5f8ce5/32.png) [@jbudd](https://discourse.nodered.org/u/jbudd)\
**Post date:** [30 January 2022 23:20 UTC](https://discourse.nodered.org/t/how-to-join-two-messages-of-different-format/57526/3 "2022-01-30T23:20:14Z")

</div>

You can achieve the same result without split and join, like this:

![Untitled 1](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/2/f/2f8fc1e41bb68930179e2e8e9585f8c4687c7bf8.jpeg)

```auto
[
    {
        "id": "321f3c38.7b8f64",
        "type": "ui_form",
        "z": "870e3dea.43e1e",
        "name": "",
        "label": "",
        "group": "eccfb0b5.c7841",
        "order": 3,
        "width": "6",
        "height": "15",
        "options": [
            {
                "label": "Ingrese proveedor",
                "value": "proveedor",
                "type": "text",
                "required": false,
                "rows": null
            },
            {
                "label": "Identificación Interna",
                "value": "interna",
                "type": "number",
                "required": false,
                "rows": null
            },
            {
                "label": "Identificación externa",
                "value": "Externa",
                "type": "number",
                "required": false,
                "rows": null
            },
            {
                "label": "Fecha de ingreso",
                "value": "Fecha",
                "type": "date",
                "required": false,
                "rows": null
            },
            {
                "label": "Hora",
                "value": "Hora",
                "type": "time",
                "required": false,
                "rows": null
            }
        ],
        "formValue": {
            "proveedor": "",
            "interna": "",
            "Externa": "",
            "Fecha": "",
            "Hora": ""
        },
        "payload": "",
        "submit": "Enviar",
        "cancel": "Cancelar",
        "topic": "datos",
        "topicType": "msg",
        "splitLayout": false,
        "className": "",
        "x": 170,
        "y": 380,
        "wires": [
            [
                "5ebe2e2b.da06b"
            ]
        ]
    },
    {
        "id": "5ebe2e2b.da06b",
        "type": "moment",
        "z": "870e3dea.43e1e",
        "name": "",
        "topic": "HoraF",
        "input": "payload.Hora",
        "inputType": "msg",
        "inTz": "America/Guayaquil",
        "adjAmount": 0,
        "adjType": "days",
        "adjDir": "add",
        "format": " HH-mm-ss",
        "locale": "es-EC",
        "output": "payload.Hora",
        "outputType": "msg",
        "outTz": "America/Guayaquil",
        "x": 310,
        "y": 380,
        "wires": [
            [
                "2d86d5aa.f8430a"
            ]
        ]
    },
    {
        "id": "2d86d5aa.f8430a",
        "type": "debug",
        "z": "870e3dea.43e1e",
        "name": "",
        "active": true,
        "tosidebar": true,
        "console": false,
        "tostatus": false,
        "complete": "false",
        "statusVal": "",
        "statusType": "auto",
        "x": 470,
        "y": 380,
        "wires": []
    },
    {
        "id": "eccfb0b5.c7841",
        "type": "ui_group",
        "name": "Datos cafrilosa",
        "tab": "e76a9497.de2648",
        "order": 1,
        "disp": true,
        "width": "6",
        "collapse": false,
        "className": ""
    },
    {
        "id": "e76a9497.de2648",
        "type": "ui_tab",
        "name": "Ingreso de datos Cafrilosa",
        "icon": "dashboard",
        "disabled": false,
        "hidden": false
    }
]

```

---

<div class="post-metadata">

**Author:** ![Jhontan14](https://avatars.discourse-cdn.com/v4/letter/j/2acd7d/32.png) [@Jhontan14](https://discourse.nodered.org/u/Jhontan14)\
**Post date:** [30 January 2022 23:25 UTC](https://discourse.nodered.org/t/how-to-join-two-messages-of-different-format/57526/4 "2022-01-30T23:25:58Z")

</div>

Is perfect 🖖  
Thank you very much!

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)\
**Post date:** [13 February 2022 23:26 UTC](https://discourse.nodered.org/t/how-to-join-two-messages-of-different-format/57526/5 "2022-02-13T23:26:08Z")

</div>

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