Reputation: 3
select STR_TO_DATE('20120801', 'YYYYMMDD');
+-------------------------------------+
| STR_TO_DATE('20120801', 'YYYYMMDD') |
+-------------------------------------+
| NULL |
+-------------------------------------+
1 row in set, 1 warning (0.00 sec)
Warning (Code 1411): Incorrect datetime value: '20120801' for function str_to_date
I am not following what syntax error is present in the String date or the date format YYYYMMDD?
Upvotes: 0
Views: 3079