Mysql – Can not use datetime type in thesql workbench

datetimeMySQL

I have tried to make a column using datetime type in MySQL workbench.
but, when I select datetime type it occurs an error like

Could not set new data type The given data type DATETIME contains
errors and cannot be accepted. The previous value is kept instead"

How can I use this type?

Best Answer

I had this problem, you need to make sure that when you select the data type you change datetime() to datetime with no ().

From MySQL 5.6.4 onwards DATETIME can have subseconds, the level of precision being defined in the (), if you are not using subseconds then simply remove this all together. This also applies to the TIME and TIMESTAMP Datatypes.

For more info see here