I have a bunch of txt files that contains a lot of data, including a date in format
dd-mm-YYYY
for example this date
15-03-2014
Researching around here i found a way to convert this date to insert in database in the correct date format YYY-mm-dd
the query is
STR_TO_DATE('$array[12]', '%Y-%m-%d')
But i'm having weird results like
2019-07-20
How can i correctly insert them to database any tips of what i'm doing wrong?