[solved] Access to MySQL Date Conversion Problem

Questions about the MySQL, PostgreSQL, and most other databases, as well as using it with PHP can be asked here.

Moderator: General Moderators

Post Reply
User avatar
vinyl-junkie
Forum Newbie
Posts: 23
Joined: Sat Nov 22, 2003 2:52 pm
Location: Seattle, WA area (USA)

[solved] Access to MySQL Date Conversion Problem

Post 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
User avatar
vinyl-junkie
Forum Newbie
Posts: 23
Joined: Sat Nov 22, 2003 2:52 pm
Location: Seattle, WA area (USA)

Post 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?
Post Reply