- java.lang.Object
- 
- java.lang.Enum<DatePart>
- 
- org.jooq.DatePart
 
 
- 
- All Implemented Interfaces:
- Serializable,- Comparable<DatePart>
 
 public enum DatePart extends Enum<DatePart> A date part can be used with SQL functions such as extract(). It describes a part of a date / datetime value- Author:
- Lukas Eder
 
- 
- 
Enum Constant SummaryEnum Constants Enum Constant Description CENTURYThe century.DAYThe day.DAY_OF_WEEKThe day of the week.DAY_OF_YEARThe day of the year.DECADEThe decade.EPOCHThe epoch in seconds since 1970-01-01.HOURThe hour.ISO_DAY_OF_WEEKThe ISO day of the week.MICROSECONDThe microsecond.MILLENNIUMThe millennium.MILLISECONDThe millisecond.MINUTEThe minute.MONTHThe month.NANOSECONDThe nanosecond.QUARTERThe quarter.SECONDThe second.TIMEZONEThe timezone offset in seconds.TIMEZONE_HOURThe time zone offset's hour part.TIMEZONE_MINUTEThe time zone offset's minute part.WEEKThe week of the year.YEARThe year.
 - 
Method SummaryAll Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description KeywordtoKeyword()StringtoSQL()static DatePartvalueOf(String name)Returns the enum constant of this type with the specified name.static DatePart[]values()Returns an array containing the constants of this enum type, in the order they are declared.
 
- 
- 
- 
Enum Constant Detail- 
YEAR@Support public static final DatePart YEAR The year. Corresponds toChronoField.YEARsemantics.
 - 
MONTH@Support public static final DatePart MONTH The month. Corresponds toChronoField.MONTH_OF_YEARsemantics.
 - 
DAY@Support public static final DatePart DAY The day. Corresponds toChronoField.DAY_OF_MONTHsemantics.
 - 
HOUR@Support public static final DatePart HOUR The hour. Corresponds toChronoField.HOUR_OF_DAYsemantics.
 - 
MINUTE@Support public static final DatePart MINUTE The minute. Corresponds toChronoField.MINUTE_OF_HOURsemantics.
 - 
SECOND@Support public static final DatePart SECOND The second. Corresponds toChronoField.SECOND_OF_MINUTEsemantics.
 - 
MILLISECOND@Support({H2,HSQLDB,SQLSERVER}) public static final DatePart MILLISECOND The millisecond.
 - 
MICROSECOND@Support({H2,HSQLDB,SQLSERVER}) public static final DatePart MICROSECOND The microsecond.
 - 
MILLENNIUM@Support public static final DatePart MILLENNIUM The millennium. The year 2000 is in the 2nd millennium, the year 2001 in the 3rd.
 - 
CENTURY@Support public static final DatePart CENTURY The century. The year 2000 is in the 20th century, the year 2001 in the 21st.
 - 
EPOCH@Support({ASE,AURORA_MYSQL,AURORA_POSTGRES,H2,HSQLDB,MARIADB,MEMSQL,MYSQL,ORACLE,POSTGRES,SQLDATAWAREHOUSE,SQLITE,SQLSERVER,SYBASE}) public static final DatePart EPOCH The epoch in seconds since 1970-01-01.
 - 
QUARTER@Support public static final DatePart QUARTER The quarter. Jan-Mar = 1, Apr-Jun = 2, Jul-Sep = 3, Oct-Dec = 4.
 - 
WEEK@Support({AURORA_POSTGRES,H2,HSQLDB,ORACLE,POSTGRES}) public static final DatePart WEEK The week of the year.
 - 
DAY_OF_YEAR@Support({ASE,AURORA_MYSQL,AURORA_POSTGRES,DB2,H2,HSQLDB,MARIADB,MEMSQL,MYSQL,ORACLE,POSTGRES,SQLDATAWAREHOUSE,SQLITE,SQLSERVER,SYBASE}) public static final DatePart DAY_OF_YEAR The day of the year. Corresponds toChronoField.DAY_OF_YEAR.
 - 
DAY_OF_WEEK@Support({ASE,AURORA_MYSQL,AURORA_POSTGRES,DB2,H2,HSQLDB,MARIADB,MEMSQL,MYSQL,ORACLE,POSTGRES,SQLDATAWAREHOUSE,SQLITE,SQLSERVER,SYBASE}) public static final DatePart DAY_OF_WEEK The day of the week. 1 = Sunday, 2 = Monday, ..., 7 = Saturday. Corresponds toChronoField.DAY_OF_WEEK, shifted by one day.
 - 
ISO_DAY_OF_WEEK@Support({ASE,AURORA_MYSQL,AURORA_POSTGRES,DB2,H2,HSQLDB,MARIADB,MEMSQL,MYSQL,ORACLE,POSTGRES,SQLDATAWAREHOUSE,SQLITE,SQLSERVER,SYBASE}) public static final DatePart ISO_DAY_OF_WEEK The ISO day of the week. 1 = Monday, 2 = Tuesday, ..., 7 = Sunday. Corresponds toChronoField.DAY_OF_WEEK.
 - 
TIMEZONE@Support({AURORA_POSTGRES,H2,HSQLDB,POSTGRES}) public static final DatePart TIMEZONE The timezone offset in seconds. Corresponds toChronoField.OFFSET_SECONDS.
 - 
TIMEZONE_HOUR@Support({AURORA_POSTGRES,H2,HSQLDB,POSTGRES}) public static final DatePart TIMEZONE_HOUR The time zone offset's hour part.
 
- 
 - 
Method Detail- 
valuespublic static DatePart[] values() Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (DatePart c : DatePart.values()) System.out.println(c); - Returns:
- an array containing the constants of this enum type, in the order they are declared
 
 - 
valueOfpublic static DatePart valueOf(String name) Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
- name- the name of the enum constant to be returned.
- Returns:
- the enum constant with the specified name
- Throws:
- IllegalArgumentException- if this enum type has no constant with the specified name
- NullPointerException- if the argument is null
 
 - 
toSQLpublic final String toSQL() 
 - 
toKeywordpublic final Keyword toKeyword() 
 
- 
 
-