SELECT (CAST((SELECT SUBSTRING( (SELECT CONVERT(varchar(10),GETDATE(),20)),1,10)) as DATE ) )
获取日期
SELECT (CAST((SELECT SUBSTRING( (SELECT CONVERT(varchar(10),GETDATE(),8)),1,10)) as TIME ) )
获取时间
获取之后并转换回date,time类型
获取日期
SELECT (CAST((SELECT SUBSTRING( (SELECT CONVERT(varchar(10),GETDATE(),8)),1,10)) as TIME ) )
获取时间
获取之后并转换回date,time类型