now the string requete_sql is:
"INSERT INTO t_data (mesure_FK,date_heure,b) VALUES (653,'Mon Nov 20 2023 12:56:53 GMT+0100 (heure normale d’Europe centrale)',1) ON DUPLICATE KEY UPDATE b=1"
so the date format changed to Mon Nov 20 2023 12:56:53 GMT+0100 (heure normale d’Europe centrale)
(I tried to use also an variable to store temporaly the msg.payload.date bur is the same)
an idea please ?
Its because the debug pane is rendering the Date object to an ISO string via Date.toJSON()
where as when you print as a string or it's part of another string it will call Date.toString()
And both of these produce different formats.
You need to format the date to the required output before including it as part of another string (such as an SQL statement)