Link to home
Create AccountLog in
Avatar of theideabulb
theideabulbFlag for United States of America

asked on

MySQL Load Data Infile Dates are all zeros

I am using the Load Data Infile process to load large data files.  The columns that are supposed to be dates are coming up all zeros.  How can i make sure that the dates stay proper dates?

LOAD DATA INFILE "C:\\mydatafile.txt"
INTO TABLE data_test
COLUMNS TERMINATED BY X'7F'
OPTIONALLY ENCLOSED BY '"'
ESCAPED BY '"'
LINES TERMINATED BY '\n'

Open in new window

Avatar of PortletPaul
PortletPaul
Flag of Australia image

Can you provide sample(s) of the file(s)?

(or look at it this way: "How do we know what is in the files?")
Avatar of theideabulb

ASKER

Here is what it looks like


111370110043LEGO Star Wars Anakin Skywalker grown up with cape from  7113 - NKH NLJ01-OCT-14 12:19:45122711900608.9920Y

111456103707LEGO Star Wars - 2 Rare Original Printed Leg Stormtroopers - Excellent - 726401-OCT-14 08:14:02257119006048.0010Y

Open in new window


You don't really see the delimiter in a pasted example
This might help. I placed those 2 rows into Notepad++, this is what it looks likeUser generated image
Yes those breaks are correct for the columns of data
Hi!

Can you post the describe table output for the table data_test ?

Regards,
      Tomas Helgi
all the table data looks good except for the date.  that looks like

0000-00-00 00:00:00
0000-00-00 00:00:00
0000-00-00 00:00:00
0000-00-00 00:00:00
ASKER CERTIFIED SOLUTION
Avatar of Tomas Helgi Johannsson
Tomas Helgi Johannsson
Flag of Iceland image

Link to home
membership
Create an account to see this answer
Signing up is free. No credit card required.
Create Account
Thank you