0

I am trying to import a csv into mySQL workbench and I am running into a persistent issue with datetime fields.

The datetime that I set on the csv is YYYY-MM-DD HH:MM:SS which seems to be the mySQL standard. At the moment of import with the Wizard from workbench- if I set the fields to datetime the import finished with 0 rows imported. my settings on import, pretty much tried all combinations

SO I am now importing everything as text and then trying to convert altering the format, setting the fields to DATETIME (doesn't allow DATETIME() ) setting to datetime after import

When I now run the alter script it fails saying that the first timestamp field has incorrect datetime value.. I am not even sure this is the actual issue now. altering script fails

Any idea?

Find screenshots of the various steps on the links provided. Thank you for the support.

I already saw the post here -> In MySQL Workbench, using "Table Data Import Wizard" to import CSV creates empty table

jarlh
  • 42,561
  • 8
  • 45
  • 63
Lore456
  • 5
  • 3
  • 1
    It would be much simpler to help you if you could post just a few lines of said CSV file, and your mySQL database schema. – MyICQ Mar 21 '23 at 22:24
  • 1
    _"When I now run the alter script it fails saying that the first timestamp field has incorrect datetime value.."_ .. what is the actual incorrect data? not in your csv file but the one already imported in your table as text. – FanoFN Mar 22 '23 at 01:07

0 Answers0