将8位字符串转换成日期型,方法如下: SELECT CONVERT(varchar(10),CAST('20070405' AS datetime),120) 转载于:https://www.cnblogs.com/chendaoyin/p/4330650.html