Appearance
Supported Dateparts
You can use the following dateparts as arguments to the following functions:
Datepart | Description | Notes |
---|---|---|
epoch | Epoch | Not supported for DATEADD. |
millennia, mil, mils | Millennium | |
centuries, century, cent, c | Century | |
decades, decade, decs | Decade | |
years, year, yrs, yr, y | Year | |
quarter, qtr | Quarter | |
months, month, mons, mon | Month | Represented as 1 through 12 with 1 being January.Returns in sentence case for DATENAME (for example, January ). |
weeks, week, w | Week | Returns ISO 8601 week numbers, 1 to 53 . |
days, day, d | Days | |
dow | Day of Week | Not supported for DATEADD.Represented as 0 through 6 with 0 being Sunday.Returns in sentence case for DATENAME (for example, Monday ). |
doy | Day of Year | Not supported for DATEADD. |
isodow | ISO 8601 Day of Week | Not supported for DATEADD. |
isoyear | ISO 8601 Day of Year | |
hours, hour, hrs, hr, h | Hours | |
minutes, minute, mins, min, m | Minutes | |
seconds, second, secs, sec, s | Seconds | |
useconds, usecond, usecs, usec, us | Microseconds | |
millisecon, mseconds, msecond, msecs, msec, ms | Milliseconds |
Dateparts can be specified in uppercase or lowercase.
Parent topic:Datetime Functions