Answer the question
In order to leave comments, you need to log in
Why doesn't STR_TO_DATE work in a subquery?
Why does this query not work in mysql :
CREATE TABLE IF NOT EXISTS __temp_orders
( SELECT * FROM orders WHERE STR_TO_DATE(orders.data,'%d.%m.%Y') < '2016-11-01 09:35:00' )
[HY000][1411] Incorrect datetime value: '' for function str_to_date
works great and returns what I want to create the table from.
SELECT * FROM orders WHERE STR_TO_DATE(orders.data,'%d.%m.%Y') < '2016-11-01 09:35:00'
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question