MySQL | How to change the datatype of a column to date datatype

preview_player
Показать описание
This video explains about how to change the datatype of a column to date datatype if dates are not present in YYYY-MM-DD format.
Рекомендации по теме
Комментарии
Автор

The reason you are getting an error is that the warning for an incorrect date value that is produced by STR_TO_DATE. May be it has timestamp. Basically, we need to investigate the reason.

To fix this, you can try with the 10 characters from left of the string. I.e.
STR_TO_DATE(LEFT(date, 10), '%d/%m/%Y');

introtallenttrainingofficial
Автор

I am getting this error :
Truncated incorrect date value: '01-01-2019' 0.000 sec

pls help

dpegn
Автор

Im gettibg error "Truncated inncorect date value"

surendars