Page 1 of 1

[solved] Access to MySQL Date Conversion Problem

Posted: Mon Nov 24, 2003 10:40 pm
by vinyl-junkie
I almost feel like I was cheating to solve this one. If you'll recall from my original post around this whole issue of converting a MS Access database to MySQL, I stated that I had been trying to use some purchased software to do the conversion and was having problems doing that. (BTW, the software in question is from here: http://www.convert-in.com/acc2sql.htm).

I got hold of their technical support one more time and was given some instructions on how to make it work within the limitations imposed by my web host. What the software will do as an alternate means of populating my database is to create a dump file with all the SQL instructions to do that. I simply logon to PHPMyAdmin, get to the screen where I enter SQL statements, enter the text file path and name in the appropriate box, then execute the commands within that file. Works like a charm! It also converts those pesky date / timestamp fields for me correctly. I am a very happy camper right now. :D

Posted: Tue Nov 25, 2003 8:20 pm
by vinyl-junkie
Forgive me for replying to my own post, but I thought I should do that since I discovered just how this software converts that date from MS Access to MySQL, preserving the fact that it's a timestamp in the process.

The Create Table code looks something like this:

Code: Select all

CREATE TABLE `tblTracks` ( 
   ........
  `LastUpdateByUser` CHAR(19),
    .......
All the INSERT statements follow that, but then the very last statement in the code fixes LastUpdateByUser, as follows:

Code: Select all

ALTER TABLE `tblTracks` CHANGE `LastUpdateByUser` `LastUpdateByUser` DATETIME;
Simple, eh?