If SQLyog is used to import data from sqlserver to mysql, SQLyog converts datetime to timestamp in case of a datetime field. The timestamp time range of mysql is 1970-01-0108: 00: 01and2038-01-1911: 14: 07. In this way, the 1900-01-0100:00:00 day in sqlserver
If SQLyog is used to import data from sqlserver to mysql, SQLyog converts datetime to timestamp in case of a datetime field. The timestamp time range of mysql is '2017-01-01 08:00:01 'and '2017-01-19 11:14:07 '. In this way, the day of '2017-01-01 00:00:00 'in sqlserver
If SQLyog is used to import data from sqlserver to mysql, SQLyog converts datetime to timestamp in case of a datetime field.
The timestamp time range of mysql is '2017-01-01 08:00:01 'and '2017-01-19 11:14:07 '.
In this way, the date of '2017-01-01 00:00:00 'in sqlserver becomes '2017-00-00 00:00:00' when it reaches mysql, and the data is forcibly converted.
If you do not want to be forcibly converted, You have to manually adjust it to datetime before importing the table to mysql. If there are many datetime fields, it is too troublesome to adjust them one by one.
However, SQLyog does not have a uniform setting. In this case, the following method can meet the requirements:
Use SQLyog's Import External Data tool
1. Create a job file. "Start a new job"-> for a series of configuration steps, refer to the online tutorial-> select the table to be imported-> Run immediately unselect, select saving options, save job file-> store the job file locally
2. Edit the job file and replace timestamp with datetime in batches.
3. Use this job file for import. Re-open the Import External Data tool and use Edit a saved job to select job file for Import.