We use a RUT241 and successfully read from o modbus server some values.Then from Data to server a valid json is created and sent over MQTT. We would like to change the date format that is written in the json
from: date: “27/03/2024 23:48:20”
to: date: “2024-03-27T23:48:20”
i.e. according to the ISO 8601 format. Is this doable? Is there perhaps a package from package manager that can act as an intermediary for the json before it is sent to the MQTT?
Thank you for your request, and apologies for the delayed response.
Currently, there isn’t any package that can act as an intermediary for the JSON before it is sent to the MQTT. Regarding the ISO 8601 format, our RnD team is planning to add the format to Data to Server functionality in the future, but the timeline is unknown. Assuming, there’s an urgent need for this functionality earlier, this would have to go with CDP.
Additionally, you can try an alternative way of getting a date in a standard (YYYY-MM-DD HH:MM) form by adding a New data input to your Data to Server collection, selecting Type – Base, Format type – Custom and putting {"local" : "%local_time%"} in the Format string field.
Please let us know if you have any further questions or need additional assistance.