I am trying to put a date to my mysql database. The column type is date. the value of orderDate is '2018-04-18' however after putting it into the database it is changed to 1997-00-00 why is that and how can i get the actual value into the database?
This is the function I used: STR_TO_DATE(${orderDate}, "%Y-%M-%D");
If I dont use the function I get an error saying 1997 is an invalid date.