EXTRACT()
Extracts a datetime unit from a datetime value
SMALLINT
or NUMERIC
EXTRACT (<part> FROM <datetime>) <part> ::= YEAR | MONTH | QUARTER | WEEK | DAY | WEEKDAY | YEARDAY | HOUR | MINUTE | SECOND | MILLISECOND | TIMEZONE_HOUR | TIMEZONE_MINUTE <datetime> ::= a DATE, TIME or TIMESTAMP expression
Parameter | Description |
---|---|
part |
Date/time unit |
datetime |
An expression of the |
Extracts and returns an element from a DATE
, TIME
or TIMESTAMP
expression.