Extraction Functions
Last updated
Last updated
This section contains extraction functions that extract unit
from an input expression. The table below contains the supported units for the given extraction functions.
Unit | Description |
---|---|
Returns the value of specified unit
from the given date-time expression.
Returns the specified unit of the given date/timestamp expression.
Returns the week number of the year.
Returns the year for a date or timestamp.
Returns the month for a date or timestamp.
Returns the day of the month for a date or timestamp.
Return the last day of the month for a date or timestamp.
Returns the three-letter day-of-week name for a date or timestamp.
Returns the hour of the day from timestamp. The value ranges from 0
to 23
.
Returns the minute of the hour from timestamp. The value ranges from 0
to 59
.
Returns the second of the minute from timestamp. The value ranges from 0
to 59
.
Day (number) of the week uses ISO semantics 1 to 7
Week (number) of the year 1 to 53.
WEEKISO is the same as WEEKOFYEAR, except uses ISO semantics 1 to 53.
YEAR
extracts year
QUARTER
extracts quarter
MONTH
extracts month
WEEK
extracts week of the year
DAY
extracts day
DOY
extract the day of the year
DOW
extract ISO day of the week (ranges from 1 (Monday) to 7 (Sunday)
HOUR
extracts hour
MINUTE
extracts minute
SECOND
extracts second
EPOCH
extracts epoch time