Import csv file to MySql table

Running MySql on a ML350 G5 HP server.  The operating system is Small Business Server 2008

I am trying to import a csv file into a table.  I am a MySql novice.  

The table structure is attached.  See file tblpivottxt structure.pdf

The contents of the csv file are below:
Ticker,Date/Time,Name,High,Low,Close,Yest Close,Yest High,
RUT-X,10/26/2015,Russell 2000,1165.77,1157.52,1159.50,1166.06,1166.42
SP-500,10/26/2015,Standard & Poors 500,2075.14,2066.53,2071.18,2075.15,2079.73

I used the commands below to try to import the data.
Mysql> LOAD DATA INFILE 'd:/investing – Programming/MySql/TxtData/PivotValues.csv'
   > INTO TABLE pivot.tblpivottxt
   > FIELDS TERMINATED BY ','
   > LINES TERMINATED BY '\n'
  > IGNORE 1 ROWS;

Error 1292 <22007> Incorrect data value:  '10/26/2015' for column 'DateEntered' at row 1

As you can see there is an error.  
In the table tblpivottxt, the DateEntered field is defined as date
The date in the csv file is in mm/dd/yyyy format.   My guess is the date format must be changed.

If I am correct, what commands would you use to change the date so it will successfully import?
Remember, I am not an expert so please provide a detailed answer.

May be you see other problems?  If so, please suggest solutions.

Thank you.
tblpivottxt-structure.pdf
donpickAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Dan CraciunIT ConsultantCommented:
To change the date you simply open the csv in Excel/OpenOffice Calc and change the formatting, then save it.

HTH,
Dan
arnoldCommented:
The formatting of date is different.
One option is to define the column as varchar, and upon import run a conversion of the data into the correct format yyyy-mm-dd and then run the alter table column change to date.

http://dev.mysql.com/doc/refman/5.7/en/date-and-time-types.html

Not sure you can use load data with type/data conversion.

Can you load the CSV in excel and reformat the date column to the correct format?
theGhost_k8Database ConsultantCommented:
There is this link explaining Load data infile with examples, you might like to review (even comments as well).

In your case you're right you need to correct the date format using: STR_TO_DATE.
You command should look something like:

LOAD DATA INFILE 'd:/investing – Programming/MySql/TxtData/PivotValues.csv'
   > INTO TABLE pivot.tblpivottxt
   > FIELDS TERMINATED BY ','
   > LINES TERMINATED BY '\n'
  > IGNORE 1 ROWS (col1, col2,..... , @var_dateentered, ..., colN)
set dateentered=STR_TO_DATE(@var_dateentered, '%m/%d/%Y');
theGhost_k8Database ConsultantCommented:
There is this link explaining Load data infile with examples, you might like to review (even comments as well).

In your case you're right you need to correct the date format using: STR_TO_DATE.
You command should look something like:

LOAD DATA INFILE 'd:/investing – Programming/MySql/TxtData/PivotValues.csv'
   > INTO TABLE pivot.tblpivottxt
   > FIELDS TERMINATED BY ','
   > LINES TERMINATED BY '\n'
  > IGNORE 1 ROWS (col1, col2,..... , @var_dateentered, ..., colN)
set dateentered=STR_TO_DATE(@var_dateentered, '%m/%d/%Y');

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
donpickAuthor Commented:
Thank you, Arnold, this is a useful link.
Thank you, theGhost_k8   Very useful information, just what I needed.  

Thank you all for your prompt posts.  I pay for this site and I appreciate prompt correct answers.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
MySQL Server

From novice to tech pro — start learning today.