Page 1 of 1

phpmyadmin exporting to csv issue

Posted: Tue Aug 12, 2014 2:27 pm
by donny
hello,

i have a database their all tinytext fields and the data in my database is all correct

however when i export to CSV it is stripping all the 0's if 0 is the beginning of a number for example 012345 is coming out as 12345 and i have a field that is like this JAN 09 in my db and the CSV makes it Jan-09 .. puts it into lowercase and replaces a space with a -

any body know why this is happening?

thank you

Re: phpmyadmin exporting to csv issue

Posted: Tue Aug 12, 2014 2:58 pm
by Celauran
You probably shouldn't have a field that contains 'JAN 09' in your database. Store dates as DATE or DATETIME and handle the formatting only when you're displaying the dates. Also, are you sure it's the export that's making those changes and not Excel? Have you tried viewing the exported CSV in a plain text editor?

Re: phpmyadmin exporting to csv issue

Posted: Tue Aug 12, 2014 3:06 pm
by donny
yes it was excel doing it. when i view it in plain text its the correct way. any idea?

Re: phpmyadmin exporting to csv issue

Posted: Tue Aug 12, 2014 3:08 pm
by Celauran
If the CSV is OK, what's the problem?

Re: phpmyadmin exporting to csv issue

Posted: Tue Aug 12, 2014 3:09 pm
by donny
the CSV is fine when viewed in plain text. when brought into excel it changing those 2 things only

Re: phpmyadmin exporting to csv issue

Posted: Tue Aug 12, 2014 3:13 pm
by Celauran
That's an Excel issue, then. I'm no pro with Excel, but maybe check the formatting of the cells in question?

Re: phpmyadmin exporting to csv issue

Posted: Tue Aug 12, 2014 3:15 pm
by donny
if its an excel issue i will figure it out. thank you very much for your help