There is the issue with datetime conversion currently “xl_date” have date MM/DD/YYYY
Example query:-
SELECT orders.*,
customer.id AS userid,
customer.login,
convert(datetime, orders.xl_date, 101) as ddates
FROM orders
LEFT JOIN customer
ON orders.userid = customers.id
WHERE 1
ORDER BY ddates DESC LIMIT 0, 30
You need to use STR_TO_DATE function. For example –
Your query is –