EXTRACT
Extracts the specified date or time part from the date or timestamp.
Syntax
EXTRACT(time_unit KEYWORD, date_time_expression DATE, TIME, TIMESTAMP) → INTEGER
time_unit: The time unit that needs to be extracted from the date, time or timestamp. This must YEAR, MONTH, DAY, HOUR, MINUTE, or SECOND.
date_time_expression: The date, time or timestamp to extract time part from.
Examples
EXTRACT example
EXTRACT example
EXTRACT example
EXTRACT example
Last updated