I have an sql database with a date field and I want to populate it with a large ammount of records from an excel spreadsheet.
Using phpMyadmin the only way I have found to import the data from the spreadsheet is by converting it to a csv file and then importing.
Unfortunately this method imports all the text fields correctly but the date field is imported as a series of zero's in the date format.
Does anyone know a way round this?
Thanks
Dave
Importing Data to sql database from excel
Moderator: General Moderators
-
dave.hawksworth
- Forum Newbie
- Posts: 11
- Joined: Thu Feb 18, 2010 8:45 am
Re: Importing Data to sql database from excel
Your date field may be in the wrong format. Can you give an example of your CSV and table format?
-
dave.hawksworth
- Forum Newbie
- Posts: 11
- Joined: Thu Feb 18, 2010 8:45 am
Re: Importing Data to sql database from excel
Thanks you were right although I thought I had checked several times The xl sheet was dd-Jan-yyyy, and the db table was yyyy-mm-dd. A bit sloppy on my part.
Dave
Dave
Re: Importing Data to sql database from excel
Please send me the code for importing file to mysql i will be thankfull to you rd.dcse@gmail.com
Thanks in advance
Thanks in advance
-
internet-solution
- Forum Contributor
- Posts: 220
- Joined: Thu May 27, 2010 6:27 am
- Location: UK
Re: Importing Data to sql database from excel
OP is using PhpMyAdmin import for importing CSV file into MySQL.rd.dcse wrote:Please send me the code for importing file to mysql i will be thankfull to you rd.dcse@gmail.com
Thanks in advance