This query returns an error because the MINUTE value of 63 is not valid. SELECT CAST(' 12:63:39.9999 ' AS TIME(6));