I am looking for some examples to get a readable datetime format out of the "moment" node.
I need something I can passthrough to my MS-SQL Server - the datetime format is defined like that:
2019-12-22 20:27:39.012
All I get from the moment node is: 2019-12-22T21:27:39.167Z
The format is wrong and its giving my the wrong time zone
Do I really have to parse this output sign by sign and re-format it ? or is there any functionality I could use ?
My guess is, that what you want is something like "YYYY-MM-DD HH.mm.ss.SS" in the output format section of the node.
Just feed a suitable time object into it via the payload, i.e. create from a function node with "msg.payload = new Date().toISOString();".
I believe the node will allow a raw timestamp value to be input, there is no point converting it to a string for the node then to convert it back to a timestamp in order to format it as required. So you can just use msg.payload = new Date()