I my MySQL (version 5.7.25) database there's have a column, which is full of varchar(100)
dates like Fri May 04 08:08:42 UTC 2018
. I need to convert them to date.
So far I've came up with
SELECT STR_TO_DATE('Fri May 04 08:08:42 UTC 2018', '%a %b %d %T %Y') AS to_date
but it returns null because of the timezone. But if I try:
SELECT STR_TO_DATE('Fri May 04 08:08:42 2018', '%a %b %d %T %Y') AS to_date
... it works perfectly. So is there a way to add a timezone to the date format?