0
我需要將'09/16/2016 17:28:25 IST'轉換爲mysql中的datetime。我嘗試了很多選擇,但它返回null。varchar '09/16/2016 17:28:25 IST'to datetime in mysql
試過選項:
select DATE_FORMAT(STR_TO_DATE('09/16/2016 17:28:25 IST', '%d/%m/%Y'), '%Y-%m-%d')
select CAST(LEFT('09/16/2016 17:28:25 IST',19) as date)
提示:'STR_TO_DATE()'。 –