OracleDate/Time FunctionsEXTRACT
TRUNC

EXTRACTDate/Time Functions

TO_DATE

Extracts a specific field from a date/time value.

Syntax

EXTRACT(field FROM date)

Example

Enter values below to update the example in real time.

employee_id
hire_date
hire_year
employees
SELECT employee_id, EXTRACT(YEAR FROM hire_date) AS hire_year
FROM employees;