SELECT EXTRACT(DOW FROM TIMESTAMP '2001-02-16 20:38:40'),
EXTRACT(YEAR FROM TIMESTAMP '2023-05-15 10:30:45'),
EXTRACT(EPOCH FROM INTERVAL '1 day 2 hours'),
EXTRACT(CENTURY FROM TIMESTAMP '2000-12-16 12:21:13'),
EXTRACT(MINUTE FROM TIMESTAMP WITH TIME ZONE '2001-02-16 20:38:40-08'),
EXTRACT(DAY FROM created_date)
FROM Events;
Implementation
Will be an expression not a function as the syntax contains the FROM operator
🥨 PR to follow
Description
Extract temporal fields - returns
Double
ornullable Double
https://www.postgresql.org/docs/current/functions-datetime.html#FUNCTIONS-DATETIME-EXTRACT
Implementation Will be an expression not a function as the syntax contains the FROM operator 🥨 PR to follow
This is to support further types such as temporal ranges: https://www.postgresql.org/docs/16/rangetypes.html#RANGETYPES-BUILTIN