SELECT
DATEPART(YEAR, GETDATE()) AS 年,
DATEPART(MONTH, GETDATE()) AS 月,
DATEPART(DAY, GETDATE()) AS 日,
DATEPART(HOUR, GETDATE()) AS 时,
DATEPART(MINUTE, GETDATE()) AS 分,
DATEPART(SECOND, GETDATE()) AS 秒,
DATEPART(MILLISECOND, GETDATE()) AS 毫秒,
DATEPART(QUARTER, GETDATE()) AS 季度,
DATEPART(DAYOFYEAR, GETDATE()) AS 年天数,
DATEPART(WEEK, GETDATE()) AS 年周数,
DATEPART(WEEKDAY, GETDATE()) AS 本周天数,
DATENAME(YEAR, GETDATE()) AS 年,
DATENAME(MONTH, GETDATE()) AS 月,
DATENAME(DAY, GETDATE()) AS 日,
DATENAME(HOUR, GETDATE()) AS 时,
DATENAME(MINUTE, GETDATE()) AS 分,
DATENAME(SECOND, GETDATE()) AS 秒,
DATENAME(MILLISECOND, GETDATE()) AS 毫秒,
DATENAME(QUARTER, GETDATE()) AS 季度,
DATENAME(DAYOFYEAR, GETDATE()) AS 年天数,
DATENAME(WEEK, GETDATE()) AS 年周数,
DATENAME(WEEKDAY, GETDATE()) AS 本周数
网友评论