Hi Jon, thanks for helping me. Here is how I created my table:
CREATE TABLE eventos_giovanne_saraiva (
Hi, Felix! I´ve tried to use the node you indicated to correct Date & Time, and added a Set node to filter only Date to add to BD so I can isolate this problem particulary to be solved. The following workflow is executing properly, but the date is still not bein added to my mySQL DB:
Here is the output in the mySQL DB after running the workflow above:
there is no “timestamp” or “datetime” format, as the data is transferred with an SQL command, which is a string.
That means you have to convert a date object to an string which is in the format MySQL expects.
Usually that format is YYYY-MM-DD HH:mm:SS or as date 2023-01-26 15:11:00
In your workflow Example, you create a new string called “data” from the “Data” string in the “Set1” node.
Then you write the correct date format with the “Date & Time” node to the string called “data”.
But the field in your database is called “Data”, so the “Insert into MySQL” node uses the falsely formatted string from the “Data” string.
tldr: change the output string in the “Date & Time” node to “Data”
I’ve just tried it again with your schema and my test workflow, when correctly formatting the date it gets inserted into the table.
The interesting part is, when the date is not correctly formatted, like in your last workflow I get an error:
I’ve just tested special characters in n8n with the MySQL node and that just does not work right now in n8n.
The n8n Team is already working on an overhaul for the MySQL node which should fix that in the near future.
In the meantime, just remove the special characters from the MySQL table and set the names without special characters in n8n with a set node.
How to fix the content of the data to display the right characters instead of question mark symbols , I’ve no idea.
EDIT: just tested this and you can disable “Read As String” in the “Convert To Spreadsheet” node, with that the special characters get parsed correctly, at least for me
You still need to change the names in the database to field names without special characters, as that’s another problem.