TimeUnit Enum
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Various options for units that describe time information.
public enum TimeUnit
type TimeUnit =
Public Enum TimeUnit
- Inheritance
-
TimeUnit
Fields
Name | Value | Description |
---|---|---|
Unknown | 0 | Unknown unit of time. |
Year | 1 | The information about the year; e.g. '2022'. |
Semester | 2 | The information about the semester; e.g. 'S1 2022'. |
SemesterOfYear | 3 | The information of the semester within the year; e.g. '2'. |
Quarter | 4 | The information about the quarter; e.g. 'Q3 2022'. |
QuarterOfYear | 5 | The information of the quarter within the year; e.g. '4'. |
QuarterOfSemester | 6 | The information of the quarter within the semester; e.g. '1'. |
Month | 7 | The information about the month; e.g. 'January 2022'. |
MonthOfYear | 8 | The information of the month within the year; e.g. 'January'. |
MonthOfSemester | 9 | The information of the quarter within the semester; e.g. '5'. |
MonthOfQuarter | 10 | The information of the quarter within the quarter; e.g. '2'. |
Week | 11 | The information about the week; e.g. 'Week 49 2022'. |
WeekOfYear | 12 | The information of the week within the year; e.g. 'Week 49'. |
WeekOfSemester | 13 | The information of the week within the semester; e.g. '15'. |
WeekOfQuarter | 14 | The information of the week within the quarter; e.g. '11'. |
WeekOfMonth | 15 | The information of the week within the month; e.g. '3'. |
Date | 16 | The information about the exact date; e.g. 'January 1st 2022'. |
DayOfYear | 17 | The information of the day within the year; e.g. '241'. |
DayOfSemester | 18 | The information of the day within the semester; e.g. '115'. |
DayOfQuarter | 19 | The information of the day within the quarter; e.g. '71'. |
DayOfMonth | 20 | The information of the day within the month; e.g. '23'. |
DayOfWeek | 21 | The information of the day within the week; e.g. '4'. |
Remarks
This enum is only supported when the compatibility level of the database is at 1701 or above.