摘要:
CONVERT(data_type,expression[,style]) convert(varchar(10),字段名,转换格式)说明:此样式一般在时间类型(datetime,smalldatetime)与字符串类型(nchar,nvarchar,char,varchar)相互转换的时候才用到.语句 结果SELECT CONVERT(varchar(100), GETDATE(), 0) 07 15 2009 4:06PMSELECT CONVERT(varchar(100), GETDATE(), 1) 07/15/09SELECT CONVERT(varchar(100), GETDA 阅读全文