select DATEPART(YY, getdate() ) AS Year,
DATEPART(QQ, getdate() ) AS Quarter,
DATEPART(WK, getdate() ) AS Week,
DATEPART(DY, getdate() ) AS dayofYear,
DATEPART(MM, getdate() ) AS Month,
DATEPART(DD, getdate() ) AS Date,
DATEPART(hour, getdate() ) AS Hour,
DATEPART(minute, getdate() ) AS Minute,
DATEPART(second, getdate() ) AS Second,
DATEPART(millisecond, getdate() ) AS Millsecond,
DATEPART(microsecond, getdate() ) AS Microsecond,
DATEPART(nanosecond, getdate() ) AS Nanosecond
Year Quarter Week dayofYear Month Date Hour Minute Second Millsecond
2022 4 51 346 12 12 12 15 2 677
No hay comentarios:
Publicar un comentario