Below is the insert command i am using, and when i run the command it gives OpenDate cannot be null error, but i’m not sure why. If I switch around the Y-m-d it says invalid format. I really dont know why i’m getting this error. The column is DateTime and the DB is InnoDB
INSERT INTO tbldealershipcars(Price,
OpenDate,
`Year`,
Make,
Model,
CarTrim,
Miles,
DeID,
VIN)
VALUES
('16888',
STR_TO_DATE('8/12/2011', '%m-%d-%Y'),
'2007',
'87',
'701',
'12299',
'73387',
'Demo',
'MyTestID')
Your date has
/s and your format has-s. They need to match.