Du kan erstatte format under import af data fra CSV-filen, for eksempel -
LOAD DATA INFILE 'file_name.csv'
INTO TABLE table_name
FIELDS TERMINATED BY ';'
LINES TERMINATED BY '\n'
(id, column2, column3, @date_time_variable) -- read one of the field to variable
SET date_time_column = STR_TO_DATE(@date_time_variable, '%d-%b-%Y'); -- format this date-time variable
Det vil formatere strengen som '31-Jan-2011' til en korrekt DATETIME-datatype.
Mere information her - INDLÆS DATAINFIL Syntaks .