|List:||General Discussion||« Previous MessageNext Message »|
|From:||Mogens Melander||Date:||November 14 2012 7:42am|
|Subject:||Re: Issue regarding the import of the date from csv file to the |
table in the database in mysql
|View as plain text|
Or you could import the date as text and convert dates using: mysql> SELECT STR_TO_DATE('04/31/2004', '%m/%d/%Y'); -> '2004-04-31' On Wed, November 14, 2012 06:13, Larry Martell wrote: > On Tue, Nov 13, 2012 at 9:56 PM, sagar bs <bs.sagar1@stripped> wrote: >> Hi, >> >> As i have the data with some 25 variables in csv file and i need to >> import >> to mysql. >> The issue is that the date format in csv file is dd/mm/yyyy and mysql >> takes >> the date format like yyyy/mm/dd. >> The number of variables in the csv file are same in the table in >> database >> of mysql. >> Please help me out. > > Convert the data in your CSV file into the format you need. So many > ways to do that, e.g.: bring in into excel and change the column's > format, use sed, use python, use vi, .... -- Mogens Melander +66 8701 33224 -- This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean.