MySQL CSV import: datetime value

后端 未结 4 1132
天命终不由人
天命终不由人 2020-12-17 03:28

I have been banging my head against a wall trying to import datetime values from a .csv file.

Here\'s the import statement.

LOAD DATA LOCAL INFILE \'m

4条回答
  •  既然无缘
    2020-12-17 04:05

    Pulled my hair out over this also because I'm not importing in the above suggested way.

    Workaround: Created a temporary field temp_date of type "VARCHAR" on your import table and have no problems loading the data. I then was able to perform an update on my date column which is of type date.

        update table
        set date = temp_date
    

提交回复
热议问题