Can not use datetime type in mysql workbench Can not use datetime type in mysql workbench mysql mysql

Can not use datetime type in mysql workbench


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


As of 5.6.4 TIME, TIMESTAMP and DATETIME can have a fractional part. To create a field with subseconds you can specify precision in brackets: TIME(3), DATETIME(6) etc.

time(3)      = 05:05:10.000 (3 precision )timestamp(6) = 2013-07-04 05:05:10.000000 (6 precision )datetime(1)  = 2013-07-04 05:05:10.0 (1 precision )datetime     = 2013-07-04 05:05:10 (0 precision )


Re-create the initial workbench connection or reset the advanced connection properties to update the server version. If the server has been upgraded and the workbench connection is not updated the workbench still thinks it is working with the old version and therefore restricts and flags the datetime(x) as an error.