10
I have some data saved as txt file. I am saving the txt file as csv in order to import it into a database using my sql workbench. what I am doing is the following:
LOAD DATA LOCAL INFILE '/path/to/csv/file.csv' INTO TABLE mytable FIELDS TERMINATED BY ',' ENCLOSED BY '"' lines terminated by '\n';
But one of my column is a date, and it is imported as 0000-00-00
How to import it in a good way ? Edit Here is what my csv contains:
id task hoursWorked begindate enddate
0 task1 15 11/17/2012 11/18/2012
1 task2 20 11/18/2012 11/20/2012
2 task3 20 12/4/2012 12/5/2013
3 task4 22 1/5/2013 1/7/2013