MySQL to MS SQL Server migration

MaluMan

Member
Nov 23, 2002
183
0
0
I'm trying to covert from MySQL db to MSSQL server, and I'm stuck at coverting the dates.

mysql exports the date as : 20040903160823

When I try to put that into a datetime variable in sql server, I get an "Arithmetic overflow error converting expression to data type datetime. ( -2147217833 ) " error

I've tried changing the format to '20040903 16:08:23' but then get "String or binary data would be truncated. ( -2147217833 ) " error

Do I have the syntax wrong??

any help is appreciated!!

thanks

 

torpid

Lifer
Sep 14, 2003
11,631
11
76
Those formats are not really useful formats. Try mm/dd/yyyy hh:mm:ss and you shoudl be ok. The main difference being /.
 

KLin

Lifer
Feb 29, 2000
30,951
1,079
126
You may have to use the convert function that's built into MSSQL to convert from the MySQL timestamp to the MSSQL datetime datatype.