Skip to content
Advertisement

convert full date string to date mysql

I have database which contains string like this

22 Jan 2019 11:03

I would like to convert this string to date so I apply this query

but I get a null result

Advertisement

Answer

All you have to do is change small letter m to big letter M in your str_to_date function.

so the final query would be:

Here is a demo

User contributions licensed under: CC BY-SA
6 People found this is helpful
Advertisement