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.
var StringToCut = msg.payload.datetime;
var Monat = StringToCut.getCharAt(5-6);
Monat = Monat.parsetoIn
var Jahr = StringToCut.getCharAt(0-3);;
Thanks in Advance!