EXTRACT(): return a year, month, day, hour, minute, second, or time zone from x
SQL>
SQL>
SQL> -- EXTRACT(): return a year, month, day, hour, minute, second, or time zone from x;
SQL>
SQL> SELECT EXTRACT(YEAR FROM TO_DATE('01-JAN-2005 19:15:26','DD-MON-YYYY HH24:MI:SS')) AS YEAR FROM dual;
YEAR
----------
2005
SQL>
Related examples in the same category