I want to sort my resultset with respect to date which is of varchar type and in this format (dd/MMM/YYYY) but the problem is its not working fine. I am using this query after a lot of search but still unable to get my desired result.
SELECT `batch_expiry` FROM `batchwise_stock` ORDER BY str_to_date(`batch_expiry`, '%d/%m/%Y')
Sorting is Not doing properly but getting this sorted dates
29/Apr/2020
03/May/2020
16/May/2020
12/May/2020
14/May/2020
Please need help, Thanks in advance.