Returns a datetime portion of a value (keyword YEAR, MONTH, DAY, HOUR, MINUTE, or SECOND). If the keyword is SECOND, the result is DECIMAL(8,6). Otherwise, the result is INTEGER.
Example:
Extract the month from a timestamp.
SELECT EXTRACT (MONTH FROM c1) FROM t1