title: Load data infile str_to_date conversion
body: <p>I have a csv file created by exporting a SQL Server table and I'm trying to import it into a MySQL table. Here are the first 10 lines of the export file</p>
  
  <pre><code>"ID","EVENT","DATE_TIME","IP_ADDRESS","USER_ID","ITEM_ID","SESSION_ID"
  5742,"browse protocol",14-JUL-09 09.15.17.000000000 AM,"10.128.101.13","","1",""
  5743,"browse protocol",14-JUL-09 09.31.37.000000000 AM,"74.181.121.77","","37",""
  5744,"browse measure",14-JUL-09 10.34.35.000000000 AM,"99.20.254.1","","25",""
  5745,"browse domain",14-JUL-09 10.39.12.000000000 AM,"65.55.104.26","","1",""
  5746,"browse measure",14-JUL-09 12.45.35.000000000 PM,"75.91.11.40","","19",""
  5747,"browse protocol",14-JUL-09 01.14.50.000000000 PM,"66.249.67.181","","41",""
  5748,"cart add measures",14-JUL-09 02.03.20.000000000 PM,"65.55.211.12","","21,23",""
  5749,"browse protocol",14-JUL-09 02.30.24.000000000 PM,"66.249.67.181","","41",""
  5750,"browse domain",14-JUL-09 03.43.47.000000000 PM,"10.128.101.13","","1",""
  5751,"browse measure",14-JUL-09 03.43.48.000000000 PM,"10.128.101.13","","11",""
  </code></pre>
  
  <p>The MySQL table requires the date time to be in the following format <code>YYYY-MM-DD HH:MM:SS</code>. </p>
  
  <p>I have the following bit of code that loads everything properly except for the date. What am I missing?</p>
  
  <pre><code>load data local infile 'C:/Users/sh/Desktop/site_metric_test.csv' into table site_metrics
  FIELDS TERMINATED BY ',' ENCLOSED BY '\"'
  (id, event, @var1, ip_address, user_id, item_id, session_id)
  SET date_time = STR_TO_DATE(@var1,'%Y-%m-%d');
  </code></pre>