DateInterval DateInterval DateInterval DateInterval Enum


指示当调用与日期相关的函数时如何确定日期间隔并设置其格式。Indicates how to determine and format date intervals when calling date-related functions.

public enum class DateInterval
public enum DateInterval
type DateInterval = 
Public Enum DateInterval


Day Day Day Day 4

一月的某一日(1 到 31)Day of month (1 through 31)

DayOfYear DayOfYear DayOfYear DayOfYear 3

年中的哪一天(从 1 到 366)Day of year (1 through 366)

Hour Hour Hour Hour 7

几点钟(从 0 到 23)Hour (0 through 23)

Minute Minute Minute Minute 8

第几分钟(从 0 到 59)Minute (0 through 59)

Month Month Month Month 2

哪个月(从 1 到 12)Month (1 through 12)

Quarter Quarter Quarter Quarter 1

哪个季度(从 1 到 4)Quarter of year (1 through 4)

Second Second Second Second 9

第几秒(从 0 到 59)Second (0 through 59)

Weekday Weekday Weekday Weekday 6

星期几(从 1 到 7)Day of week (1 through 7)

WeekOfYear WeekOfYear WeekOfYear WeekOfYear 5

年中的哪一周(从 1 到 53)Week of year (1 through 53)

Year Year Year Year 0



调用与日期相关的函数时, 可以在代码中使用枚举成员来代替实际值。When you call date-related functions, you can use enumeration members in your code in place of the actual values.

DateInterval枚举定义与日期相关的函数一起使用的常量, 以标识如何确定日期间隔并设置其格式。The DateInterval enumeration defines constants used with date-related functions to identify how date intervals are determined and formatted. 有关示例, 请参见DatePart方法。For an example, see the DatePart method.