I am looking for a query resolution for one of insert scenarios in MySQL.
Below is the scenario:
create table test (test_date date);
insert into test values (str_to_date('16/04/1991','%d/%m/%y'))
MySQL is not allowing me to insert this record and displays an error "Truncated incorrect value"
I tried using IGNORE
:
insert ignore into test values (str_to_date('16/04/1991','%d/%m/%y'))
but it captured year as 2019.
Please help.
thanks!