Convert MSSQL dates to MySQL

I’m moving a database from MSSQL to MySQL, I was cruising along with CSV files until I hit a table that has some date columns. They weren’t showing up right no matter what, until I found this post:

http://abbyandwin.net/blog/2007/08/14/how-to-convert-mssql-date-format-to-mysql

Here’s the query to run on MSSQL:

SELECT CONVERT(VARCHAR(40),[date_column_name],120) AS new_date_format FROM [table_name]

Thanks Abby & Win!

This entry was posted in Uncategorized. Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *