Insert date and time SQL SERVER

It isnt a node-red thing, its a SQL thing. You need single quotes around any string values you send.

e.g.

msg.topic = "insert into Valores (TesteDataString) values ('" + date + "')"

However - I still strongly recommend you use parameters


I recommend watching this playlist: Node-RED Essentials. 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.