scalar

EXTRACT

Retrieves a temporal component; supported fields depend on the input type. Example target: PostgreSQL 17. No tables or extensions required.

Formal Syntax & Structure

sql syntaxsql
EXTRACT(field FROM source)

Working Example

Example Snippetsql
SELECT extract(year FROM DATE '2024-02-29');
SQL Reference