Moving from MySQL to MS-SQL: date to datetime conversion ?

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
waskelton4
Forum Contributor
Posts: 132
Joined: Mon Sep 09, 2002 6:42 pm

Moving from MySQL to MS-SQL: date to datetime conversion ?

Post by waskelton4 »

Howdy group,

I have been tasked by my supervisor to convert my current php/mysql database application to work with MS-SQL.

I've been trying to move the data over using the "Data Transformation Services" in the SQL Server Enterprise manager and have almost gotten it through with no errors.

I'm connecting to the mysql server via the latest ODBC connector from the mysql website (3.51.12)


The only data move that is creating problems now is the conversion of a mysql date field to one of the mssql date or date time fields.. but i'm not totally sure what the problem is. here is the error
The number of failing rows exceeds the maximum specified.
Insert error, column 6 ('dDOB', DBTYPE_DBTIMESTAMP), status 6: Data overflow.
Inavlid character value for cast specification.
I'm not sure why it is saying DBTIMESTAMP because the dDOB destination field isn't a timestamp field. It has been a datetime and shortdate but not timestamp.

I'm not really very familiar with how dates and times are stored in mssql. I'm much better with them when they are in mysql.

Thanks in advance for any help.

Will
Post Reply