MySQL date formats – difficulty Inserting a date
Put the date in single quotes and move the parenthesis (after the ‘yes’) to the end: But you can always use dates without STR_TO_DATE() function, just use the (Y-m-d) ‘20120101’ or ‘2012-01-01’ format. Check the MySQL docs: Date and Time Literals