SELECT STR_TO_DATE('2017-03-13T14:39:01.123','%Y-%m-%dT%H:%i:%s.%f');
##Only MySQL SELECT CAST("2017-08-29 14:39:01" AS DATETIME); SELECT CAST(ColumnName AS DATETIME);