I had this problem, you need to make sure that when choosing the data type you change the date and time () to datetime using no ().
From MySQL 5.6.4 onwards, DATETIME can have sub-segments, the level of accuracy is defined in (), if you do not use sub-seconds, then just delete it all together. This also applies to the TIME and TIMESTAMP data types.
See here for more details.
source share