I've just had my first project which involves migrating a MSSQL database into MySQL, and I've just hit my first puzzler (which I'm hoping is something that anyone who performs these migrations regularly will find trivial).
The dates seem to be stored as the equivalent of a UNIX timestamp - values like 38376.51454 and 39406.75522 - and I've searched both Google and CodingForums.com, but to be honest I'm not sure of the terminology, so I'm not sure if I'm searching for the right thing.
I have MSSQL Server Management Studio 2005, am running MySQL 5.0.41 and have the MySQL GUI Tools (although I've not persuaded the Migration Assistant to work) and Navicat, in case there's anything that I can do when actually migrating the data, rather than transforming it after.
Ideally, I'd like the dates stored as MySQL dates, as that would make it easier for me to continue working with the imported data, and create new entries.
Can anyone point me in the right direction?
__________________
If anyone asks my boss, this counts as work, okay?
Not sure if you've tried it out yet, but MySQL has a migration toolkit available for download. Handles data migration automatically if you're just moving data from one db to the other. I've used it for Access-to-MySQL migration.
They aren't Unix timestamps: They are actually ODBC DATETIME values, not native SQL Server values. I'm guessing he is getting the data from SQL Server via an ODBC connection of some sort.
They are the number of days since 30 December 1899 expressed as a floating point number. That is, the integer part is the number of days; the fraction is the fraction of 24 hours on the date in question. (e.g., 17.75 would be 17 January 1900 18:00:00)
Those two dates are:
1/24/2005 12:20:56 PM
11/20/2007 6:07:31 PM
SQL Server uses an entirely different scheme for encoding datetime values. Two integers: First is number of days since 1/1/1900 and second is number of funny units since midnight. If I remember correctly, the funny units are 1/3 of a millisecond, or something like that. It's all in the SQL Server docs, of course.
Last edited by Old Pedant; 06-25-2009 at 06:23 AM..
I think u should use a third party help to resolve this problem, i use dbload to solve it when i was migrated my data, it can migrate almost any data, it helps me to convert MSSQL to MYSQL, MS access to MSSQL, mysql, csv loader, foxpro and MSSQL to MS access, MYSQl, CSV, foxpro etc. i found it on google search.
Here is a tool to convert MSSQL to MYSQL database. That i found on google search it this converter can do migrate any data try and tel me is that worth or not.
I think u should use a third party help to resolve this problem, i use dbload to solve it when i was migrated my data, it can migrate almost any data, it helps me to convert MSSQL to MYSQL, MS access to MSSQL, mysql, csv loader, foxpro and MSSQL to MS access, MYSQl, CSV, foxpro etc. i found it on google search.