1 select 'current time (datepart) '= GETDATE (), YEAR = DATEPART (YEAR, GETDATE (), QUARTER = DATEPART (QUARTER, GETDATE ()), month = DATEPART (Month, GETDATE ()), 2 weeks = DATEPART (WEEK, GETDATE (), Sunday = DATEPART (WEEKDAY, GETDATE (), DAY = DATEPART (DAY, GETDATE ()), 3-year days = DATEPART (DAYOFYEAR, GETDATE (), HOUR = DATEPART (HOUR, GETDATE (), MINUTE = DATEPART (MINUTE, GETDATE ()), 4 seconds = DATEPART (SECOND, GETDATE (), MILLISECOND = DATEPART (MILLISECOND, GETDATE ()) 5 6 select 'current time (datename) '= GETDATE (), YEAR = DATENAME (YEAR, GETDATE (), QUARTER = DATENAME (QUARTER, GETDATE ()), month = DATENAME (Month, GETDATE ()), WEEK 7 = DATENAME (WEEK, GETDATE (), Sunday = DATENAME (WEEKDAY, GETDATE (), DAY = DATENAME (DAY, GETDATE ()), 8-year days = DATENAME (DAYOFYEAR, GETDATE (), HOUR = DATENAME (HOUR, GETDATE (), MINUTE = DATENAME (MINUTE, GETDATE ()), 9 seconds = DATENAME (SECOND, GETDATE (), MILLISECOND = DATENAME (MILLISECOND, GETDATE ()) |