• We’re currently investigating an issue related to the forum theme and styling that is impacting page layout and visual formatting. The problem has been identified, and we are actively working on a resolution. There is no impact to user data or functionality, this is strictly a front-end display issue. We’ll post an update once the fix has been deployed. Thanks for your patience while we get this sorted.

MySQL to MS SQL Server migration

MaluMan

Member
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

 
Those formats are not really useful formats. Try mm/dd/yyyy hh:mm:ss and you shoudl be ok. The main difference being /.
 
You may have to use the convert function that's built into MSSQL to convert from the MySQL timestamp to the MSSQL datetime datatype.
 
Back
Top