I'm trying to convert a date with m/d/y format to yyyy-mm-dd.
select lastname, firstname, filingdate, str_to_date(filingdate, '%m/%d/%y') as reformattedDate
from Table;
For the returned dates, the month and day are correct, but the year is always 2020, even though the years in the original dates range from 2008 to 2021.
What am I doing wrong?
%y only recognizes 2 digits of year you must use %Y
db<>fiddle here