i get some Sensor Values per MQTT in my Node Red Flow and they always have a timestamp which always has the same form.
The Code should look like this. But i don't know how to get Characters out of the whole string by their position index and then convert them to integer, because i need to send them per Modbus-TCP.
//Nachricht: 2020-09-11T10:03:50Z
var StringToCut = msg.payload.datetime;
var Monat = StringToCut.getCharAt(5-6);
Monat = Monat.parsetoIn
var Jahr = StringToCut.getCharAt(0-3);;
var Tag;
var Stunde;
var Sekunde;
var Minute;