CONVERT函数是把时间转换成新类型的通用格式,这样方便查询 CONVERT(type,expression,style) type: 例如:varchar(10) 数据库字符串的类型,大小可以自己定 expression: 表示时间的字段 style:格式,可以输出的时间格式. 主要是这个格式很多种: Style ID Style 格式 100 或者 0 mon dd yyyy hh:miAM (或者 PM) 101 mm/dd/yy 102 yy.mm.dd 103 dd/mm/yy 1…