DateTimePart ENUM

The constituent parts of a data time object, in Gregorian calendar.

Pay particular attention to the index for each part. Both MONTH and DAY are 1-based; HOURS and below are 0-based.

All Members


TypeNameValue
constantYEAR0
constantMONTH1
constantDAY2
constantHOUR3
constantMINUTE4
constantSECOND5
constantMILLISECOND6

Constants


public const DateTimePart YEAR = 0

Year

public const DateTimePart MONTH = 1

Month (1-12)

public const DateTimePart DAY = 2

Day in a month (1-31)

public const DateTimePart HOUR = 3

Hour in a day (0-23)

public const DateTimePart MINUTE = 4

Minute in an hour (0-59)

public const DateTimePart SECOND = 5

Second in a minute (0-59)

public const DateTimePart MILLISECOND = 6

Millisecond in a second (0-999)